CN111562929A - Method, device and equipment for generating patch file and storage medium - Google Patents

Method, device and equipment for generating patch file and storage medium Download PDF

Info

Publication number
CN111562929A
CN111562929A CN202010358024.XA CN202010358024A CN111562929A CN 111562929 A CN111562929 A CN 111562929A CN 202010358024 A CN202010358024 A CN 202010358024A CN 111562929 A CN111562929 A CN 111562929A
Authority
CN
China
Prior art keywords
resource
file
package
version
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010358024.XA
Other languages
Chinese (zh)
Inventor
王志远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mihoyo Technology Shanghai Co ltd
Original Assignee
Mihoyo Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mihoyo Technology Shanghai Co ltd filed Critical Mihoyo Technology Shanghai Co ltd
Priority to CN202010358024.XA priority Critical patent/CN111562929A/en
Publication of CN111562929A publication Critical patent/CN111562929A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses a method, a device, equipment and a storage medium for generating a patch file, wherein the method comprises the following steps: packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; and generating a patch file according to the at least one target resource package so as to update the original version resource file according to the at least one target resource package in the patch file. The technical scheme of the embodiment of the invention solves the problem that the data stored in the patch file still occupies a larger memory due to easy dislocation when the patch file is determined directly based on binary difference at present, realizes updating the original resource file based on the resource packet in the patch file, improves the updating efficiency of the original resource file, and also saves the technical effect of downloading resources.

Description

Method, device and equipment for generating patch file and storage medium
Technical Field
The embodiment of the invention relates to the technical field of video game development, in particular to a method, a device, equipment and a storage medium for generating a patch file.
Background
In the actual operation of the game, new roles may be added to the game, or the game scene may be optimized to improve the user experience. When a user logs in a game, the version of the game installed in the current terminal needs to be updated.
At present, updating the game version installed at the current terminal mainly comprises downloading a new version installation package, decompressing the new version installation package, and under the condition that the quantity of downloaded installation package data is overlarge; moreover, compared with the original version installation package, the new version installation package may only add, delete or modify part of the data, so that resources are wasted when the new version installation package is downloaded.
In order to achieve the effect of saving resources, in the prior art, a binary algorithm is mainly adopted to perform binary differentiation comparison on a new version installation package and an original version installation package, that is, one binary differentiation is compared to determine a difference, and the determined binary difference is written into a patch file, so that the installation package of the original version is updated according to a downloaded patch file.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for generating a patch file, which can save downloading resources and improve the technical effect of updating efficiency when a version or a system is updated.
In a first aspect, an embodiment of the present invention provides a method for generating a patch file, where the method includes:
packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource;
determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource;
and generating a patch file according to the at least one target resource package so as to update the original version resource file according to the at least one target resource package in the patch file.
In a second aspect, an embodiment of the present invention further provides an apparatus for generating a patch file, where the apparatus includes:
the new version resource file determining module is used for packaging all resources of the new version by adopting a method for packaging the resources of the original version to obtain a new version resource file; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource;
the target resource package determining module is used for determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource;
and the patch file generation module is used for generating a patch file according to the at least one target resource packet so as to update the original version resource file according to the at least one target resource packet in the patch file.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating a patch file according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform the patch file generation method according to any one of the embodiments of the present invention.
The technical scheme of the embodiment of the invention packs each resource of the new version by adopting the method for packing the resource of the original version to obtain the resource file of the new version, determines at least one updated target resource packet according to the resource file of the original version and the label information of each resource packet in the resource file of the new version, generates the patch file according to at least one target resource packet to update the resource file of the original version according to at least one target resource packet in the patch file, solves the problems that the data stored in the patch file still occupies a larger memory due to easy dislocation when the patch file is directly determined based on binary difference comparison in the prior art, and the problem that the original resource file is inconvenient for debugging and error correction due to unreadable patch file, realizes the update of the original resource file based on the resource packets in the patch file, improves the update efficiency of the original resource file, and the technical effect of downloading resources is also saved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a method for generating a patch file according to an embodiment of the present invention;
fig. 2 is another schematic flow chart illustrating a method for generating a patch file according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for generating a patch file according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a method for generating a patch file according to an embodiment of the present invention, where the embodiment is applicable to a situation of upgrading an installation package, a system, or another application version of a game, and the method may be executed by a device for generating a patch file, where the device may be implemented in a form of software and/or hardware, and optionally, the hardware may be an electronic device or a PC.
Before the technical scheme of the embodiment of the invention is introduced, a scene which can be suitable for the embodiment of the invention is briefly introduced. The terminal is provided with a system and at least one application program, optionally, the application program may be an application program related to a game, and when the version of the system or the application program is upgraded, the version upgrade may be implemented based on the technical solution of the embodiment. Namely, the original version resource file is upgraded to a new version resource file, so that the installed application program is the latest version.
As shown in fig. 1, the method of this embodiment includes:
s110, packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; the new version resource file comprises one resource package less.
The resource file comprises at least one resource package, and each resource package comprises at least one resource. The resources can be packed according to the dependency relationship among the resources to obtain at least one resource package. It should be noted that, the resource packaging method may be implemented by a user according to actual requirements, and is not specifically limited herein.
In order to quickly determine the patch file, the resources of different versions can be packaged according to the same method, and the resource packages obtained after packaging can be subjected to medium integration to obtain the resource files of each version.
The version to be upgraded installed on the terminal may be used as the original version, for example, a system installed on the mobile terminal needs to be upgraded, and the version corresponding to the system installed on the mobile terminal may be used as the original version. The original version comprises at least one resource package, and correspondingly, the original version can also be used as an original version resource file. The new version resource file may be a version obtained by upgrading the original version. And the new version system comprises all updated resource packages. The new version resource file is a resource file obtained by packaging the new version resource.
Specifically, each resource after upgrading is obtained, and each resource after upgrading is packaged according to the method for packaging the resource of the original version, so that at least one resource package is obtained. All resource packages can be integrated to obtain a new version of the resource file.
That is, the new version resource file includes at least one resource package therein, and each resource package includes at least one resource therein.
For example, if the game application installed on the terminal needs to be upgraded, that is, the application installed on the terminal needs to be upgraded. For example, the current version of the game application a installed on the terminal is 1.0, i.e., the original version resource file is 1.0. In order to improve user experience, game scenes in a game are optimized and upgraded, and the version of an application program subjected to optimization and upgrade can be marked as 2.0, that is, the version of a new version resource file is marked as 2.0. And packaging each resource in the original version resource file and the new version resource file by adopting the same method to obtain at least one resource package.
S120, determining at least one updated target resource package according to the label information of each resource package in the original version resource file and the new version resource file.
It should be noted that, when each resource is packaged to obtain a resource package, each resource package may be numbered, and a resource identifier corresponding to the resource package is generated according to the content in the resource package, that is, when a resource package is generated, tag information corresponding to each resource package may be determined, where the tag information includes the number of the resource package and an identifier corresponding to the content of the resource package.
The label information comprises the name of the resource packet, the number of the resource packet and an identifier corresponding to the content of the resource packet. The new version resource file is obtained by modifying, deleting or newly adding the resource package of the original version resource file on the basis of the original version resource file. Accordingly, the target resource package may be a newly added, deleted and/or modified resource package. The target resource packet may be determined according to the label information of each resource packet.
Specifically, the resource name, the resource number, and the identifier corresponding to the content of the resource package of each resource package in the original version resource file may be obtained. And comparing the label information in the original version resource file with the label information in the new version resource file, determining the new version resource file relative to the newly added resource package, the deleted resource package and/or the modified resource package in the original version resource file, and using the determined resource package as a target resource package so as to update the original version resource file according to the target resource to obtain the new version resource file.
S130, generating a patch file according to the at least one target resource package, and updating the original version resource file according to the at least one target resource package in the patch file.
Wherein the patch file is pre-established for storing the target resource package. The patch file includes at least one target resource package. The target resource package may be a newly added resource package, and/or a modified resource package. The target resource package may be stored in a pre-established patch file.
It should be noted that, when the original version resource file is updated, the patch file may be downloaded, so that the original version resource file is updated based on the downloaded patch file to obtain a new version resource file.
Specifically, after the patch file is determined, if the original version resource file needs to be updated, the patch file may be downloaded to update the original version resource file to obtain a new version resource file.
In this embodiment, determining the patch file and updating the original version resource file based on the downloaded patch file has the following advantages: the new version resource file comprises a plurality of resources in the original version resource file, and the problems of large downloading amount and resource waste exist if the new version resource file is directly downloaded. That is, the deleted resource package, the newly added resource package and/or the modified resource package can be determined based on the difference between the original version resource file and the new version resource file, and stored in the patch file, so that the original version resource file is updated according to the resource package stored in the patch file, and the technical effects of saving download resources and improving version updating efficiency are achieved. Furthermore, because the updated resource packages are directly determined, the condition of binary dislocation does not exist, and the situation that the data size stored in the patch file is large cannot be caused.
The technical scheme of the embodiment of the invention packs each resource of the new version by adopting the method for packing the resource of the original version to obtain the resource file of the new version, determines at least one updated target resource packet according to the resource file of the original version and the label information of each resource packet in the resource file of the new version, generates the patch file according to at least one target resource packet to update the resource file of the original version according to at least one target resource packet in the patch file, solves the problems that the data stored in the patch file still occupies a larger memory due to easy dislocation when the patch file is directly determined based on binary difference comparison in the prior art, and the problem that the original resource file is inconvenient for debugging and error correction due to unreadable patch file, realizes the update of the original resource file based on the resource packets in the patch file, improves the update efficiency of the original resource file, and the technical effect of downloading resources is also saved.
Example two
On the basis of the above technical solution, after at least one target resource package is determined, a metadata file corresponding to the target resource package needs to be generated, so as to determine, according to the metadata file, a specific position of each target resource stored in the patch file in the original version resource file. Fig. 2 is another schematic flow chart of a method for generating a patch file according to a second embodiment of the present invention.
As shown in fig. 2, the method includes:
s210, packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; the new version resource file comprises at least one resource package.
The method for packaging the resources of the original version can be that the resources with direct dependency relationship exist or the resources with single dependency relationship are packaged together to be a resource package according to the dependency relationship among the resources. Correspondingly, the resources of the new version can be packaged in the same way, and the advantages are that: because the packing modes are the same, the resource package difference between the new version resource file and the original version resource file can be quickly found, and then the target resource package is determined, namely the resource package with the difference is taken as the target resource package.
Optionally, a method for packaging the resources of the original version is adopted, and each resource of the new version is packaged to obtain at least one resource package and tag information corresponding to each resource package; integrating at least one resource package together to serve as a new version resource file; the label information comprises a resource package name corresponding to the resource package and an identifier corresponding to the content of the resource package.
That is to say, the method of packaging the resource of the original version is adopted to package the resource of the new version to obtain at least one resource package, and tag information of each resource package is determined, so as to determine a difference between the resource file of the new version and the resource of the original version according to the tag information, and optionally, the difference may be a newly added resource, a deleted resource and/or a modified resource.
S220, determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file.
Optionally, acquiring original tag information of each resource package in the original version resource file and new version tag information of each resource package in the new version resource file; the original label information and the new version label information are checked to determine a target resource package; the target resource package includes at least one of a newly added resource package, a deleted resource package, and a modified resource package.
Specifically, the tag information of each resource package in the original version resource file and the tag information of each resource package in the new version resource file can be respectively obtained, and according to the name of the resource package in each version resource file and the identifier corresponding to the content of the resource package, the new resource package, the deleted resource package and/or the modified resource package of the new version resource file relative to the original version resource file can be determined, and the resource package determined at this time is used as the target resource package.
And S230, determining the position information of the deleted resource package and/or the modified resource package in the new version file and the data information occupying the resource block.
After the target resource package is determined, in order to determine specific location information of the added, modified or deleted target resource package in the original version file, location information of each target resource package and data information of a resource block occupied by each resource package may be acquired.
Optionally, the position information and occupied resource block information of the added resource packet in the original version resource file are determined, and the position information and occupied resource block data information of the newly added and/or modified resource packet stored in the patch file are determined.
That is to say, the position information of each added or deleted resource package in the original resource document may be obtained, and optionally, the specific position of the target resource package in the original resource document, and the number or length of the resource blocks occupied by the target resource package in the original document. Further, in order to determine the specific information of the target resource package stored in the patch document, when the target resource package is stored in the patch document, the position of the target resource package stored in the target document and the occupied resource block information may be modified or added.
S240, establishing a corresponding relation table between the position information and the data block information of each target resource package in the original version file or the new version file and the position information and the occupied resource block information stored in the patch file, and storing the corresponding relation table as a metadata file in the patch file.
The corresponding relation table may store the position information and occupied data block information of the target resource package in the original version resource file or the new version resource file, and the corresponding relation between the position information and the data block information of the target resource package stored in the patch file. Namely the specific position of the modified resource in the original document resource, the occupied resource information, and the corresponding relation between the specific position of the modified resource package stored in the patch document and the occupied resource block information. The correspondence table may be used as a metadata file, and the metadata file may be stored in the patch file. In consideration of the fact that when the original version resource file is updated based on the target resource in the patch file, the target resource package can be updated to the original version resource file according to the corresponding relation in the metadata file, and the resource updating efficiency is improved. Because the patch file only comprises modified, deleted or added resources, the technical effect of saving the downloading resources can be achieved when the original version resource file is updated based on the downloaded indefinite file.
Specifically, when the target resource package is determined based on the tag information in the original version resource file and the tag information in the new version resource file, the specific position of the target resource package in the original version resource file and the occupied resource block data information may be recorded. When the target resource package is stored in the patch file, the specific position of the target resource package stored in the patch file and the occupied resource block data information are recorded at the same time. The established correspondence table may be stored as a metadata file in a patch file established in advance.
And S250, generating a patch file according to the at least one target resource packet, and updating the original version resource file according to the at least one target resource packet in the patch file.
Optionally, the generating the patch file according to the at least one target resource package may be: generating binary data information corresponding to the target resource packages according to the data corresponding to the target resource packages, and storing the binary data information into a pre-established patch file to be stored; and storing the metadata file into a patch file to be stored to obtain the patch file.
The patch file to be stored is pre-established and is used for storing a target resource package, namely binary data information corresponding to the target resource package. The patch file is a file storing the target resource package and the metadata file.
That is to say, after the target resource package is determined, binary data information corresponding to the target resource package may be generated, the binary data information is stored in a pre-established patch file to be stored, and the metadata file is stored in the patch file to be stored, so as to obtain the patch file.
Specifically, after the binary data information corresponding to the target resource package is determined, the length, the position and the number of occupied resource blocks corresponding to the binary data can be stored in the corresponding relation table, and a binding relation is established between the binary data and the resource package corresponding to the binary data, so that when the original resource version is updated based on the patch file, the corresponding relation table determines the specific position of the target resource package in the original version resource file to be replaced and updated, and the new version resource file is obtained.
Updating the original version resource file according to the patch file may be: and according to the metadata file in the patch file, determining the position information and occupied resource block information of each target resource packet in the patch file in the original version resource file, and updating the corresponding resource packet into the original version resource file according to the position information and the resource block information.
Optionally, updating the modified resource package into the original version resource file according to the position information and the resource block information; or deleting the target resource from the original version resource file according to the position information and the resource block information; or adding the newly added target resource package into the original version resource file according to the position information and the resource block information.
The technical scheme of the embodiment of the invention packs each resource of the new version by adopting the method for packing the resource of the original version to obtain the resource file of the new version, determines at least one updated target resource packet according to the resource file of the original version and the label information of each resource packet in the resource file of the new version, generates the patch file according to at least one target resource packet to update the resource file of the original version according to at least one target resource packet in the patch file, solves the problems that the data stored in the patch file still occupies a larger memory due to easy dislocation when the patch file is directly determined based on binary difference comparison in the prior art, and the problem that the original resource file is inconvenient for debugging and error correction due to unreadable patch file, realizes the update of the original resource file based on the resource packets in the patch file, improves the update efficiency of the original resource file, and the technical effect of downloading resources is also saved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a device for generating a patch file according to a third embodiment of the present invention, where the device includes: a new version resource file determination module 310, a target resource package determination module 320, and a patch file generation module 330.
The new version resource file determining module 310 is configured to package each resource of the new version by using a method for packaging a resource of the original version to obtain a new version resource file; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource; a target resource package determining module 320, configured to determine at least one updated target resource package according to the original version resource file and the tag information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource; the patch file generating module 330 is configured to generate a patch file according to the at least one target resource package, so as to update the original version resource file according to the at least one target resource package in the patch file.
On the basis of the above technical solution, the new version resource file determination module is further configured to: packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain at least one resource package and label information corresponding to each resource package; integrating the at least one resource package together as the new version resource file; the label information comprises a resource package name corresponding to the resource package and an identifier corresponding to the content of the resource package.
The technical scheme of the embodiment of the invention packs each resource of the new version by adopting the method for packing the resource of the original version to obtain the resource file of the new version, determines at least one updated target resource packet according to the resource file of the original version and the label information of each resource packet in the resource file of the new version, generates the patch file according to at least one target resource packet to update the resource file of the original version according to at least one target resource packet in the patch file, solves the problems that the data stored in the patch file still occupies a larger memory due to easy dislocation when the patch file is directly determined based on binary difference comparison in the prior art, and the problem that the original resource file is inconvenient for debugging and error correction due to unreadable patch file, realizes the update of the original resource file based on the resource packets in the patch file, improves the update efficiency of the original resource file, and the technical effect of downloading resources is also saved.
On the basis of the foregoing technical solutions, the target resource packet determining module is further configured to: acquiring original label information of each resource package in an original version resource file and new version label information of each resource package in a new version resource file; the original label information and the new version label information are checked to determine a target resource package; the target resource package includes at least one of a newly added resource package, a deleted resource package, and a modified resource package.
On the basis of the foregoing technical solutions, the target resource packet determining module, after determining at least one target resource, is further configured to: determining the position information of the deleted resource packet and/or the modified resource packet in the new edition file and the data information occupying the resource block; determining the position information and occupied resource block information of the added resource packet in the original version resource file, and determining the position information and occupied resource block data information of the newly added resource packet stored in the patch file; and establishing the position information and the data block information of each target resource package in the original version file or the new version file, and a corresponding relation table stored between the position information and the occupied resource block information in the patch file, and storing the corresponding relation table as a metadata file into the patch file.
On the basis of the above technical solutions, the patch file generation module is further configured to: generating binary data information corresponding to each target resource package according to the data corresponding to the target resource package, and storing the binary data information into a pre-established patch file to be stored; and storing the metadata file into the patch file to be stored to obtain the patch file.
On the basis of the above technical solutions, the patch file generation module is further configured to: and according to the metadata file in the patch file, determining the position information and occupied resource block information of each target resource packet in the patch file in the original version resource file, and updating the corresponding resource packet into the original version resource file according to the position information and the resource block information.
On the basis of the above technical solutions, the patch file generation module is further configured to: updating the modified resource packet into the original version resource file according to the position information and the resource block information; or deleting the target resource from the original version resource file according to the position information and the resource block information; or adding the newly added target resource package into the original version resource file according to the position information and the resource block information.
The device for generating the patch file provided by the embodiment of the invention can execute the method for generating the patch file provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary device 40 suitable for use in implementing embodiments of the present invention. The device 40 shown in fig. 4 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 4, device 40 is embodied in a general purpose computing device. The components of device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. Device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
Device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with device 40, and/or with any devices (e.g., network card, modem, etc.) that enable device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 412. As shown, network adapter 412 communicates with the other modules of device 40 via bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by executing programs stored in the system memory 402, for example, to implement the patch file generation method provided by the embodiment of the present invention.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which are used for executing the method for generating the patch file when being executed by a computer processor.
The method comprises the following steps:
packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource;
determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource;
and generating a patch file according to the at least one target resource package so as to update the original version resource file according to the at least one target resource package in the patch file.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for generating a patch file, comprising:
packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain a resource file of the new version; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource;
determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource;
and generating a patch file according to the at least one target resource package so as to update the original version resource file according to the at least one target resource package in the patch file.
2. The method of claim 1, wherein packaging each resource of the new version by packaging the resource of the original version to obtain a resource file of the new version comprises:
packaging each resource of the new version by adopting a method for packaging the resource of the original version to obtain at least one resource package and label information corresponding to each resource package;
integrating the at least one resource package together as the new version resource file;
the label information comprises a resource package name corresponding to the resource package and an identifier corresponding to the content of the resource package.
3. The method of claim 1, wherein the determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file comprises:
acquiring original label information of each resource package in an original version resource file and new version label information of each resource package in a new version resource file;
the original label information and the new version label information are checked to determine a target resource package;
the target resource package includes at least one of a newly added resource package, a deleted resource package, and a modified resource package.
4. The method of claim 3, further comprising, after said determining the updated at least one target resource package:
determining the position information of the deleted resource packet and/or the modified resource packet in the new edition file and the data information occupying the resource block;
determining the position information and occupied resource block information of the added resource packet in the original version resource file, and determining the position information and occupied resource block data information of the newly added and/or modified resource packet stored in the patch file;
and establishing a corresponding relation table between the position information and the occupied resource block information of each target resource package in the original version file or the new version file and the position information and the occupied resource block information stored in the patch file, and storing the corresponding relation table as a metadata file in the patch file.
5. The method of claim 4, wherein generating a patch file from the at least one target resource package comprises:
generating binary data information corresponding to each target resource package according to the data corresponding to the target resource package, and storing the binary data information into a pre-established patch file to be stored;
and storing the metadata file into the patch file to be stored to obtain the patch file.
6. The method as claimed in claim 5, wherein said updating the original version resource file according to the at least one target resource package in the patch file comprises:
and according to the metadata file in the patch file, determining the position information and occupied resource block information of each target resource packet in the patch file in the original version resource file, and updating the corresponding resource packet into the original version resource file according to the position information and the resource block information.
7. The method according to claim 6, wherein the updating the corresponding resource package into the original version resource file according to the location information and the resource block information comprises:
updating the modified resource packet into the original version resource file according to the position information and the resource block information; or the like, or, alternatively,
deleting the target resource from the original version resource file according to the position information and the resource block information; or
And adding the newly added target resource package into the original version resource file according to the position information and the resource block information.
8. An apparatus for generating a patch file, comprising:
the new version resource file determining module is used for packaging all resources of the new version by adopting a method for packaging the resources of the original version to obtain a new version resource file; the new version resource file comprises at least one resource package; the resource packet comprises at least one resource;
the target resource package determining module is used for determining at least one updated target resource package according to the original version resource file and the label information of each resource package in the new version resource file; the original version resource file is a file obtained by packaging the original version resource;
and the patch file generation module is used for generating a patch file according to the at least one target resource packet so as to update the original version resource file according to the at least one target resource packet in the patch file.
9. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of generating a patch file as claimed in any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions for performing the method of generating a patch file according to any one of claims 1 to 7 when executed by a computer processor.
CN202010358024.XA 2020-04-29 2020-04-29 Method, device and equipment for generating patch file and storage medium Pending CN111562929A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010358024.XA CN111562929A (en) 2020-04-29 2020-04-29 Method, device and equipment for generating patch file and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010358024.XA CN111562929A (en) 2020-04-29 2020-04-29 Method, device and equipment for generating patch file and storage medium

Publications (1)

Publication Number Publication Date
CN111562929A true CN111562929A (en) 2020-08-21

Family

ID=72071853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010358024.XA Pending CN111562929A (en) 2020-04-29 2020-04-29 Method, device and equipment for generating patch file and storage medium

Country Status (1)

Country Link
CN (1) CN111562929A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112657196A (en) * 2020-12-21 2021-04-16 北京像素软件科技股份有限公司 Resource updating method and device, computer equipment and readable storage medium
CN113254045A (en) * 2021-06-07 2021-08-13 中电金信软件有限公司 Software initialization method, system and computer readable storage medium
WO2023217086A1 (en) * 2022-05-09 2023-11-16 维沃移动通信有限公司 Resource file updating method and apparatus, and device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188097A (en) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 Method, device and system achieving patch management
CN106528229A (en) * 2016-11-03 2017-03-22 北京像素软件科技股份有限公司 Game hot updating method and device
CN108874438A (en) * 2018-06-25 2018-11-23 南京中感微电子有限公司 Patch generation method, device, electronic equipment and computer program product
CN110908697A (en) * 2019-11-28 2020-03-24 米哈游科技(上海)有限公司 Resource packaging method, device, server and storage medium
CN111008034A (en) * 2019-12-02 2020-04-14 网易(杭州)网络有限公司 Patch generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188097A (en) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 Method, device and system achieving patch management
CN106528229A (en) * 2016-11-03 2017-03-22 北京像素软件科技股份有限公司 Game hot updating method and device
CN108874438A (en) * 2018-06-25 2018-11-23 南京中感微电子有限公司 Patch generation method, device, electronic equipment and computer program product
CN110908697A (en) * 2019-11-28 2020-03-24 米哈游科技(上海)有限公司 Resource packaging method, device, server and storage medium
CN111008034A (en) * 2019-12-02 2020-04-14 网易(杭州)网络有限公司 Patch generation method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112657196A (en) * 2020-12-21 2021-04-16 北京像素软件科技股份有限公司 Resource updating method and device, computer equipment and readable storage medium
CN113254045A (en) * 2021-06-07 2021-08-13 中电金信软件有限公司 Software initialization method, system and computer readable storage medium
WO2023217086A1 (en) * 2022-05-09 2023-11-16 维沃移动通信有限公司 Resource file updating method and apparatus, and device and readable storage medium

Similar Documents

Publication Publication Date Title
CN110865888B (en) Resource loading method and device, server and storage medium
CN110908697B (en) Resource packaging method, device, server and storage medium
CN111562929A (en) Method, device and equipment for generating patch file and storage medium
CN111740948B (en) Data packet issuing method, dynamic updating method, device, equipment and medium
CN110908707B (en) Resource packaging method, device, server and storage medium
CN108647032B (en) Application loading method and device, computer device and computer readable storage medium
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN106775781B (en) Method and device for reducing application installation packages and electronic equipment
CN115994122B (en) Method, system, equipment and storage medium for caching information
CN110609687A (en) Compiling method, device, electronic equipment and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN114329366B (en) Network disk file control method and device, network disk and storage medium
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN112612489A (en) Software upgrade package construction method and device and electronic equipment
CN106484375B (en) Instruction block loading method, soft switch equipment and system
CN113448585B (en) Compiling method and device of thread pool, electronic equipment and storage medium
CN115098297A (en) Method and system for generating consistent snapshot of cloud native storage data volume
CN112988686A (en) Plug-in processing method, device, equipment and storage medium
CN114721709A (en) Program package generation method, device, storage medium and computer equipment
CN109634636B (en) Application processing method, device, equipment and medium
CN114090502A (en) Resource management method, device, equipment and storage medium
CN113377376A (en) Data packet generation method, data packet generation device, electronic device, and storage medium
WO2019157891A1 (en) Application installation method and application installer generating method
CN110795408A (en) Data processing method and device based on object storage, server and storage medium
CN111651188A (en) Data result determining method, device, equipment and storage medium for differential packet

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200821

RJ01 Rejection of invention patent application after publication