CN107239309B - Patch generation method and device, updating method, electronic device and storage medium - Google Patents

Patch generation method and device, updating method, electronic device and storage medium Download PDF

Info

Publication number
CN107239309B
CN107239309B CN201710416863.0A CN201710416863A CN107239309B CN 107239309 B CN107239309 B CN 107239309B CN 201710416863 A CN201710416863 A CN 201710416863A CN 107239309 B CN107239309 B CN 107239309B
Authority
CN
China
Prior art keywords
patch
terminal
resource file
resource
file
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.)
Active
Application number
CN201710416863.0A
Other languages
Chinese (zh)
Other versions
CN107239309A (en
Inventor
张道鹏
王英侨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710416863.0A priority Critical patent/CN107239309B/en
Publication of CN107239309A publication Critical patent/CN107239309A/en
Application granted granted Critical
Publication of CN107239309B publication Critical patent/CN107239309B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The disclosure relates to a patch generation method and device, a patch updating method, an electronic device, and a computer-readable storage medium, which are used for generating a patch for an application program. The patch generation method comprises the following steps: encrypting and compressing an original resource file to obtain a standard resource file; acquiring common resource files which are commonly used for different terminal types from standard resource files and configuring the common resource files under a common resource directory; for each terminal type, acquiring a special resource file suitable for the terminal type from a standard resource file and configuring the special resource file under a special resource directory corresponding to the terminal type; the patch corresponding to any terminal type includes a shared resource file in a shared resource directory and a dedicated resource file in a dedicated resource directory corresponding to the terminal type. The method and the device for generating the patch can be suitable for application program clients of different terminal types, and meanwhile time consumption and occupied space of patch generation can be reduced.

Description

Patch generation method and device, updating method, electronic device and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a patch generation method and apparatus, a patch update method, an electronic device, and a computer-readable storage medium.
Background
The Patch technology is a technology that, when an application client updates application content, the client does not need to be downloaded and installed again, and only needs to update program codes and program resources required on a local machine. The Patch technology is widely applied to various application programs of current mainstream application platforms, such as network games, wherein the application platforms include mobile platforms such as iOS and Android, and PC (Personal computer) platforms such as Windows.
Patch can be divided into incremental Patch and full Patch according to its policy.
The increment Patch means: after the application program is downloaded and installed for the first time, the current application program content is recorded as V by the application program client; when the application program is required to be updated by the application program client, all the change content P relative to the previous version is uploaded on the server side, and the change content P is the increment Patch; respectively recording change content P1, change content P2, … … and change content Pn according to the version number of the increment Patch; when the application client updates to the latest version, all the incremental Patch needs to be downloaded one by one according to the sequence of the version numbers, so that the latest application content Vn can be obtained, i.e. Vn is V + P1+ P2+ … … + Pn. The delta Patch may support the compression of the Patch content into one large file and upload to the server side, followed by decompression locally at the application client.
The total batch means: when the application program client needs to update the application program, uploading the latest application program content Vn on the server side; when the application client downloads the Patch, the client only needs to compare the difference between the local application content Vm and the latest application content Vn and download the changed part, so that the application content of the application client is updated to the latest version. The full Patch requires that the comparison of the application program contents between the server and the application program client is accurate to a file level, that is, it is required that whether each file in the application program contents can be compared or not updated.
At present, a plurality of application program engines adopt a full amount of Patch when Patch updating is carried out, but the Patch updating method has the problems of large occupied space, high time consumption and the like.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a patch generation method and apparatus, a patch update method, an electronic device, and a computer-readable storage medium, which overcome one or more of the problems due to the limitations and disadvantages of the related art, at least to some extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to one aspect of the present disclosure, a patch generation method is provided for generating a patch for an application; the patch generation method comprises the following steps:
encrypting and compressing an original resource file to obtain a standard resource file;
acquiring common resource files which are commonly used for different terminal types from the standard resource files and configuring the common resource files under a common resource directory;
for each terminal type, acquiring a special resource file suitable for the terminal type from the standard resource file and configuring the special resource file under a special resource directory corresponding to the terminal type;
the patch corresponding to any terminal type comprises a common resource file in the common resource directory and a dedicated resource file in the dedicated resource directory corresponding to the terminal type.
In an exemplary embodiment of the present disclosure, the different terminal types include a first terminal corresponding to a first application platform, a second terminal corresponding to a second application platform, and a third terminal corresponding to a third application platform;
obtaining a dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in a dedicated resource directory corresponding to the terminal type includes:
acquiring a first dedicated resource file suitable for the first terminal from the standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
In an exemplary embodiment of the present disclosure, the first terminal is a terminal operating an iOS system, the second terminal is a terminal operating an Android system, and the third terminal is a terminal operating a Windows system.
In an exemplary embodiment of the present disclosure, the different terminal types include a first terminal corresponding to a first hardware configuration, a second terminal corresponding to a second hardware configuration, and a third terminal corresponding to a third hardware configuration;
obtaining a dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in a dedicated resource directory corresponding to the terminal type includes:
acquiring a first dedicated resource file suitable for the first terminal from the standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
In an exemplary embodiment of the present disclosure, encrypting and compressing the original resource file to obtain the standard resource file includes:
encrypting and compressing the script file, the art resource file and the engine configuration file according to a reference format to obtain the standard resource file;
the reference format is a file format supported by a development engine of the application program.
In an exemplary embodiment of the present disclosure, acquiring a common resource file that is common to different terminal types from the standard resource file includes:
and acquiring the script file, the engine configuration file, and the scene file and the skeleton action file in the art resource file from the standard resource file.
In an exemplary embodiment of the present disclosure, the patch generating method further includes:
comparing the patch with a historical patch stored at a server side to obtain a delta patch and the same part of the patch relative to the historical patch;
and uploading the incremental patch to the server, and generating a record identifier pointing to the historical patch stored at the server terminal aiming at the same part.
According to an aspect of the present disclosure, there is provided a patch update method including:
obtaining a patch generated according to the patch generation method;
comparing the obtained patch with local content to obtain content to be updated;
downloading part or all of the content to be updated from the incremental patch of the patch relative to the historical patch stored at the server;
and when the incremental patch does not completely comprise the content to be updated, downloading the rest part of the content to be updated from the historical patch according to the record identifier pointing to the historical patch stored at the server.
According to an aspect of the present disclosure, a patch generating apparatus is provided for generating a patch for an application; the patch generating apparatus includes:
the encryption compression module is used for encrypting and compressing the original resource file to obtain a standard resource file;
the shared resource module is used for acquiring shared resource files which are commonly used for different terminal types from the standard resource files and configuring the shared resource files under a shared resource directory;
the special resource module is used for acquiring a special resource file suitable for the terminal type from the standard resource file and configuring the special resource file under a special resource directory corresponding to the terminal type for each terminal type;
the patch corresponding to any terminal type comprises a common resource file in the common resource directory and a dedicated resource file in the dedicated resource directory corresponding to the terminal type.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the patch generation method described above or the patch update method described above via execution of the executable instructions.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the patch generation method described above or the patch update method described above.
The patch generation method and apparatus, the patch updating method, the electronic device, and the computer-readable storage medium according to the exemplary embodiments of the present disclosure configure the generated patch under different resource directories according to different resource types used by an application. In this way, by configuring the resource files applicable to each terminal type under the common resource directory and configuring the resource files specific to the specific terminal type under the corresponding dedicated resource directory, the repeated generation of the generic patches can be avoided, thereby achieving the effects of reducing the time consumption of patch generation and saving the occupied space; on this basis, since the corresponding resource file is generated for each terminal type, that is, the corresponding patch is generated for each terminal type, the present embodiment can be applied to different terminal types at the same time.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically illustrates a first flowchart of a patch generation method in an exemplary embodiment of the disclosure;
FIG. 2 schematically illustrates an architecture diagram of a patch generation method in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of a patch storage directory in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a second flowchart of a patch generation method in an exemplary embodiment of the disclosure;
FIG. 5 schematically illustrates a patch generation and update method in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates a flow chart of a patch update method in an exemplary embodiment of the present disclosure;
fig. 7 schematically shows a schematic block diagram of a patch generating apparatus in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of an electronic device in an exemplary embodiment of the disclosure;
fig. 9 schematically shows a schematic diagram of a program product in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The present exemplary embodiment provides a patch generation method for generating a patch for an application; as shown in fig. 1, the patch generation method may include:
s1, encrypting and compressing the original resource file to obtain a standard resource file;
s2, acquiring common resource files which are commonly used for different terminal types from the standard resource files and configuring the common resource files under a common resource directory;
and S3, for each terminal type, obtaining a dedicated resource file suitable for the terminal type from the standard resource file and configuring the dedicated resource file under the dedicated resource directory corresponding to the terminal type.
The patch corresponding to any terminal type includes a shared resource file in a shared resource directory and a dedicated resource file in a dedicated resource directory corresponding to the terminal type.
It should be noted that: the application program in the present exemplary embodiment may specifically be a software program or a game program.
According to the patch generation method provided by the exemplary embodiment of the disclosure, the generated patches are configured under different resource catalogs according to different resource types used by the application programs. In this way, by configuring the resource files applicable to each terminal type under the common resource directory and configuring the resource files specific to the specific terminal type under the corresponding dedicated resource directory, the repeated generation of the generic patches can be avoided, thereby achieving the effects of reducing the time consumption of patch generation and saving the occupied space; on this basis, since the corresponding resource file is generated for each terminal type, that is, the corresponding patch is generated for each terminal type, the present embodiment can be applied to different terminal types at the same time.
The patch generation method according to the present exemplary embodiment will be described in detail below with reference to the drawings.
In step S1, the original resource file is encrypted and compressed to obtain a standard resource file.
In this exemplary embodiment, the original resource file refers to a resource file provided by an application developer, and may specifically include: script files, art resource files, and engine configuration files; the art resource file can include: models, maps, skeletal actions, physics, scenes, UIs (User interfaces), sounds, etc. The standard resource file refers to a resource file adopting a reference format, and the reference format is a file format supported by a development engine of an application program.
Based on this, encrypting and compressing the original resource file in this step to obtain the standard resource file may specifically include: and encrypting and compressing the script file, the art resource file and the engine configuration file according to the standard format to obtain the standard resource file.
For example, the Patch generation method in this embodiment may be used to generate a Patch for a network game application, and the Patch may be classified into different categories according to the game engine used by the game client, such as the Patch system of the Cocos engine and the Patch system of the Unity3D engine, because different game engines use different scripting languages and file systems, are provided with different interfaces, and are applicable to different game platforms, and therefore the Patch system needs to adapt to different game engines.
Taking a game engine as an example, as shown in fig. 2, when a patch needs to be generated, an original resource file such as a script file, an art resource file, and an engine configuration file provided by a game developer needs to be converted into a resource format and a file system distribution supported by a game client of the game engine, which can be implemented by calling a Chef tool of the game engine on a Windows platform to perform a cook operation on the original resource file used by a game. The Chef tool is a tool provided by the game engine and specially used for compressing and encrypting the script file and the art resource file used by the game engine into a file format supported by the game engine game according to a specific format, and the process of compression and encryption is cook. For example, the process may control options for the book by inputting specified parameters, such as "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
In step S2, a common resource file common to different terminal types is obtained from the standard resource file and is configured under the common resource directory.
In this example embodiment, the terminal type may be classified according to an operating system run by the terminal, for example, a terminal running an iOS operating system or a terminal running an Android operating system; of course, the terminal type may also be classified according to the system configuration of the terminal, such as a terminal having a high-level configuration of the iOS operating system or a terminal having a low-level configuration of the iOS operating system; the classification standard for the terminal in this embodiment is not limited thereto, and all factors that may affect the generation and update of Patch are within the protection scope of this embodiment. The common resource file refers to a resource file applicable to each type of terminal, and may include, for example, a script file, an engine configuration file, a scene file and a skeleton action file in an art resource file, and the like. The shared resource directory refers to a directory pointing to a shared resource file in the Patch directory.
Based on this, the obtaining of the common resource file commonly used for different terminal types from the standard resource file in this step may specifically include: and acquiring the script file, the engine configuration file, and the scene file and the skeleton action file in the art resource file from the standard resource file.
For example, as shown in fig. 3, after the standard resource file is obtained in step S1, the common resource file such as the script file, the engine configuration file, and the scene file and the skeleton motion file in the art resource file, which are commonly used for different terminal types, may be placed in the common resource folder and configured under the common resource directory in the Patch directory.
In step S3, for each terminal type, a dedicated resource file applicable to the terminal type is obtained from the standard resource file and configured under the dedicated resource directory corresponding to the terminal type.
In this exemplary embodiment, the dedicated resource file refers to a resource file only for a specific type of terminal, and may include, for example, a model, physics, UI, sound, and the like in an art resource file. The dedicated resource directory refers to a directory pointing to a dedicated resource file in the Patch directory.
In this embodiment, the terminal type may be classified according to an operating system run by the terminal. In this case, the different terminal types may include a first terminal corresponding to the first application platform, a second terminal corresponding to the second application platform, and a third terminal corresponding to the third application platform; the first terminal may be a terminal running an iOS system, the second terminal may be a terminal running an Android system, and the third terminal may be a terminal running a Windows system.
Based on this, acquiring the dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in the dedicated resource directory corresponding to the terminal type may include:
acquiring a first dedicated resource file suitable for a first terminal from a standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file, and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
In this embodiment, the terminal type may also be classified according to a hardware configuration adopted by the terminal. In this case, the different terminal types may include a first terminal corresponding to a first hardware configuration, a second terminal corresponding to a second hardware configuration, and a third terminal corresponding to a third hardware configuration; the first terminal may adopt a high-level hardware configuration, the second terminal may adopt a medium-level hardware configuration, and the third terminal may adopt a low-level hardware configuration. The high level, the middle level, and the low level are relative relationships, and can be divided according to the Processing capability of a processor such as a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), and the like.
Based on this, acquiring the dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in the dedicated resource directory corresponding to the terminal type may include:
acquiring a first dedicated resource file suitable for a first terminal from a standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file, and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
Based on the two exemplary classification methods described above, different types of terminals may be classified, for example, into a first terminal, a second terminal, and a third terminal according to a specific classification criterion. However, the present embodiment does not exclude other classification methods, nor does it limit the number of terminal types divided according to a particular classification method.
It should be noted that: the terminal classification method in the present exemplary embodiment may be used alone, for example, only according to an operating system run by a terminal, and at this time, a first terminal running an iOS system, a second terminal running an Android system, and a third terminal running a Windows system may be obtained; or the terminal is classified according to the hardware configuration adopted by the terminal, and at this time, a first terminal adopting a high-level hardware configuration, a second terminal adopting a medium-level hardware configuration, and a third terminal adopting a low-level hardware configuration can be obtained. Of course, the terminal classification method in this exemplary embodiment may also be used in combination, for example, the terminal is classified by combining an operating system run by the terminal and a hardware configuration adopted by the terminal, and the obtained terminals may include three terminals running an iOS system, three terminals running an Android system, and a terminal running a Windows system.
For example, referring to fig. 3, after the standard resource file is obtained in step S1, the dedicated resource files such as the model, the physical property, and the UI in the art resource file suitable for the iOS platform may be placed in a dedicated resource folder and configured under the iOS-common dedicated resource directory corresponding to the iOS platform in the Patch directory, the dedicated resource files such as the model, the physical property, and the UI in the art resource file suitable for the Android platform may be placed in a dedicated resource folder and configured under the Android-common dedicated resource directory corresponding to the Android platform in the Patch directory, and the dedicated resource files such as the model, the physical property, and the UI in the art resource file suitable for the Windows platform may be placed in a dedicated resource folder and configured under the Windows-common dedicated resource directory corresponding to the Windows platform in the Patch directory.
On the basis, the art resource files suitable for the iOS platform or the Android platform not only comprise special resource files such as models, physics, UIs and sounds which can be generally used for the iOS platform or the Android platform, but also comprise special resource files suitable for different hardware configurations such as maps. At this time, for the terminal running the iOS platform, according to the height of the hardware configuration, the special resource file such as the map in the art resource file is placed in a special resource folder and is configured in the iOS-high, iOS-middle and iOS-low special resource directory which corresponds to the iOS platform and has different hardware configurations in the Patch directory; similarly, for a terminal running the Android platform, according to the height of the hardware configuration of the terminal, special resource files such as the maps in the art resource files are placed in a special resource folder and are configured in the special resource directory corresponding to the Android platform and under the Android-high, Android-midle and Android-low special resource directories with different hardware configurations; the terminal running the Windows platform can be allocated according to the above method, but the dedicated resource file can also be uniformly allocated in the Patch directory under the Windows-normal dedicated resource directory corresponding to the Windows platform.
Therefore, when various terminals need to update game contents, the required patches to be updated can be obtained from the shared resource files in the shared resource directory in the step 2 and the dedicated resource files in the dedicated resource directory in the step 3. Taking the game client configured by the advanced hardware of the iOS platform as an example, the resources that need to be downloaded are respectively obtained from the common directory, the iOS-common directory, and the iOS-high directory.
Based on the above process, as shown in fig. 4, the patch generation method may further include:
s4, comparing the generated patch with the historical patch stored at the server side to obtain a delta patch and the same part of the patch relative to the historical patch;
and S5, uploading the incremental patch to the server, and generating a record identifier pointing to the historical patch stored at the server side aiming at the same part.
The historical patch refers to a patch which is uploaded to the server side.
The purpose of the present example embodiment is to generate patches for applications, whereas the conventional patch system has disadvantages in that: every time when the application program client is required to update, all program contents need to be uploaded to the server, and if the program contents are large, the occupied space of the server is increased, and the uploading time is also increased. In view of the above, in the present exemplary embodiment, by comparing the currently generated patch with the uploaded historical patch, only the changed incremental patch is uploaded according to the comparison result without uploading the unchanged incremental patch, so that the number of files to be uploaded can be greatly reduced, and the purpose of reducing the time consumed by uploading the patch is achieved.
For example, after the game patch is generated through the above steps S1-S3, the generated game patch needs to be uploaded to the server side so that the game client side can download the update. As shown in fig. 5, in the case that a historical patch is uploaded to the server, if a game resource changes and a new patch needs to be uploaded, the patch generated by the above method may be compared with the historical patch to obtain an incremental patch with update change and the same portion without change. For the delta Patch with update change, it needs to be uploaded to the server, and for the same part without change, a record identifier of the Patch directory pointed to the historical Patch by the delta Patch is generated. Still taking the game engine as an example, it can be known from test and verification that the Patch generation and uploading by using the method provided by the embodiment can reduce the Patch occupation space from 7G to 4G, effectively reduce the occupation space by 42%, reduce the generation time consumption from 40 minutes to 16 minutes as fast as possible, effectively reduce the generation time consumption by 60%, reduce the uploading time consumption from 120 minutes to 10 minutes, and effectively reduce the uploading time consumption by 91%. Therefore, the optimized Patch generation method can effectively reduce the occupied space, the time consumption for generating and uploading Patch.
In this example embodiment, a patch updating method is further provided, and as shown in fig. 6, the patch updating method may include:
s10, obtaining a patch generated by the patch generation method;
s20, comparing the obtained patch with local content to obtain content to be updated;
s30, downloading part or all of the content to be updated from the incremental patch of the patch relative to the historical patch stored at the server side;
and S40, when the incremental patch does not completely include the content to be updated, downloading the rest part of the content to be updated from the historical patch according to the record identification pointing to the historical patch stored at the server.
For example, referring to FIG. 5, when a game client needs to be started, it is compared with a newly uploaded delta patch to obtain the content that needs to be updated. After comparison, the game client first downloads the newly updated content from the delta patch portion, and for content not in the delta patch, the game client downloads from the historical patch.
Therefore, the patch download updating method provided by the present embodiment corresponds to the patch generation method described above. Specifically, in the process of generating and uploading the Patch, the newly uploaded incremental Patch has a record identifier pointing to the Patch directory of the Patch that has been uploaded before, and when the game client of the game engine needs to be updated, the game client compares the difference between the local game resource and the server resource first, and then downloads the resource that needs to be updated from the incremental Patch part and the previous uploaded historical Patch part respectively.
Therefore, when the patch is updated, the latest updated content can be directly obtained from the incremental patch, the patch is prevented from being downloaded from the historical patch once, and the downloaded and updated content is repeatedly downloaded from the incremental patch, so that the time consumed by updating the patch is saved.
The present exemplary embodiment further provides a patch generating apparatus, configured to generate a patch for an application. As shown in fig. 7, the patch generating means may include:
the encryption compression module 10 is used for encrypting and compressing the original resource file to obtain a standard resource file;
a shared resource module 20, configured to obtain shared resource files that are commonly used for different terminal types from the standard resource files and configure the shared resource files under a shared resource directory;
a dedicated resource module 30, configured to, for each terminal type, obtain a dedicated resource file applicable to the terminal type from the standard resource file and configure the dedicated resource file in a dedicated resource directory corresponding to the terminal type;
the patch corresponding to any terminal type comprises a common resource file in the common resource directory and a dedicated resource file in the dedicated resource directory corresponding to the terminal type.
The patch generating apparatus provided by the exemplary embodiment of the present disclosure configures generated patches under different resource directories according to different resource types used by an application program. In this way, by configuring the resource files applicable to each terminal type under the common resource directory and configuring the resource files specific to the specific terminal type under the corresponding dedicated resource directory, the repeated generation of the generic patches can be avoided, thereby achieving the effects of reducing the time consumption of patch generation and saving the occupied space; on this basis, since the corresponding resource file is generated for each terminal type, that is, the corresponding patch is generated for each terminal type, the present embodiment can be applied to different terminal types at the same time.
It should be noted that: the specific details of each module unit in the patch generating apparatus have been described in detail in the corresponding patch generating method, and are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 600 in the drawings is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 8, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that couples the various system components including the memory unit 620 and the processing unit 610.
Wherein the storage unit 620 stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the above exemplary method section of the present specification. For example, the processing unit 610 may execute step S1 shown in fig. 1, encrypting and compressing the original resource file to obtain a standard resource file; step S2, obtaining common resource files which are commonly used for different terminal types from the standard resource files and configuring the common resource files under a common resource directory; step S3, for each terminal type, obtaining a dedicated resource file suitable for the terminal type from the standard resource file and configuring the dedicated resource file under the dedicated resource directory corresponding to the terminal type.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 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 the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, 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.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention described in the above-mentioned exemplary method section of the present description, when said program product is run on said terminal device.
Referring to fig. 9, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 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.
Program code for carrying out operations for aspects 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, 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (11)

1. A patch generation method for generating a patch for an application; the patch generation method is characterized by comprising the following steps:
encrypting and compressing an original resource file to obtain a standard resource file;
acquiring common resource files which are commonly used for different terminal types from the standard resource files and configuring the common resource files under a common resource directory;
for each terminal type, acquiring a special resource file suitable for the terminal type from the standard resource file and configuring the special resource file under a special resource directory corresponding to the terminal type;
the patch corresponding to any terminal type comprises a common resource file in the common resource directory and a dedicated resource file in the dedicated resource directory corresponding to the terminal type.
2. The patch generation method according to claim 1, wherein the different terminal types include a first terminal corresponding to a first application platform, a second terminal corresponding to a second application platform, and a third terminal corresponding to a third application platform;
obtaining a dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in a dedicated resource directory corresponding to the terminal type includes:
acquiring a first dedicated resource file suitable for the first terminal from the standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
3. The patch generation method according to claim 2, wherein the first terminal is a terminal running an iOS system, the second terminal is a terminal running an Android system, and the third terminal is a terminal running a Windows system.
4. The patch generation method according to claim 1, wherein the different terminal types include a first terminal corresponding to a first hardware configuration, a second terminal corresponding to a second hardware configuration, and a third terminal corresponding to a third hardware configuration;
obtaining a dedicated resource file applicable to the terminal type from the standard resource file and configuring the dedicated resource file in a dedicated resource directory corresponding to the terminal type includes:
acquiring a first dedicated resource file suitable for the first terminal from the standard resource file and configuring the first dedicated resource file under a first dedicated resource directory corresponding to the first terminal;
acquiring a second dedicated resource file suitable for the second terminal from the standard resource file and configuring the second dedicated resource file under a second dedicated resource directory corresponding to the second terminal;
and acquiring a third dedicated resource file suitable for the third terminal from the standard resource file and configuring the third dedicated resource file under a third dedicated resource directory corresponding to the third terminal.
5. The patch generation method of claim 1, wherein encrypting and compressing the original resource file to obtain the standard resource file comprises:
encrypting and compressing the script file, the art resource file and the engine configuration file according to a reference format to obtain the standard resource file;
the reference format is a file format supported by a development engine of the application program.
6. The patch generation method according to claim 5, wherein obtaining a common resource file common to different terminal types from the standard resource file comprises:
and acquiring the script file, the engine configuration file, and the scene file and the skeleton action file in the art resource file from the standard resource file.
7. A patch generation method according to any one of claims 1 to 6, further comprising:
comparing the patch with a historical patch stored at a server side to obtain a delta patch and the same part of the patch relative to the historical patch;
and uploading the incremental patch to the server, and generating a record identifier pointing to the historical patch stored at the server terminal aiming at the same part.
8. A patch update method, comprising:
obtaining a patch generated by the patch generation method according to any one of claims 1 to 7;
comparing the obtained patch with local content to obtain content to be updated;
downloading part or all of the content to be updated from the incremental patch of the patch relative to the historical patch stored at the server;
and when the incremental patch does not completely comprise the content to be updated, downloading the rest part of the content to be updated from the historical patch according to the record identifier pointing to the historical patch stored at the server.
9. A patch generating apparatus for generating a patch for an application; wherein the patch generating apparatus comprises:
the encryption compression module is used for encrypting and compressing the original resource file to obtain a standard resource file;
the shared resource module is used for acquiring shared resource files which are commonly used for different terminal types from the standard resource files and configuring the shared resource files under a shared resource directory;
the special resource module is used for acquiring a special resource file suitable for the terminal type from the standard resource file and configuring the special resource file under a special resource directory corresponding to the terminal type for each terminal type;
the patch corresponding to any terminal type comprises a common resource file in the common resource directory and a dedicated resource file in the dedicated resource directory corresponding to the terminal type.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the patch generation method of any one of claims 1-7 or the patch update method of claim 8 via execution of the executable instructions.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the patch generation method of any one of claims 1 to 7 or the patch update method of claim 8.
CN201710416863.0A 2017-06-06 2017-06-06 Patch generation method and device, updating method, electronic device and storage medium Active CN107239309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710416863.0A CN107239309B (en) 2017-06-06 2017-06-06 Patch generation method and device, updating method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710416863.0A CN107239309B (en) 2017-06-06 2017-06-06 Patch generation method and device, updating method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN107239309A CN107239309A (en) 2017-10-10
CN107239309B true CN107239309B (en) 2021-03-02

Family

ID=59985354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710416863.0A Active CN107239309B (en) 2017-06-06 2017-06-06 Patch generation method and device, updating method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN107239309B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861736A (en) * 2017-11-01 2018-03-30 网易(杭州)网络有限公司 Patch generates and update method and device, electronic equipment, storage medium
CN109522041B (en) * 2018-10-15 2021-11-23 网易(杭州)网络有限公司 Client resource updating method, device, processor, server and terminal
CN109446161B (en) * 2018-10-18 2021-12-28 网易(杭州)网络有限公司 Information monitoring method and device, electronic equipment and storage medium
CN111008034B (en) * 2019-12-02 2023-11-24 网易(杭州)网络有限公司 Patch generation method and device
CN111399895A (en) * 2020-04-13 2020-07-10 网易(杭州)网络有限公司 Client updating method and device, electronic equipment and computer readable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831001A (en) * 2012-09-11 2012-12-19 北京百纳威尔科技有限公司 Method and device for manufacturing of software upgrading package and method and device for program upgrading
CN103744709A (en) * 2014-01-23 2014-04-23 华为技术有限公司 Patch loading method and device
CN105487907A (en) * 2015-12-07 2016-04-13 青岛海信电器股份有限公司 Difference package manufacturing method and device
CN105824643A (en) * 2016-03-25 2016-08-03 浪潮通用软件有限公司 Method for multiversion API adaptation of enterprise management software
CN106354525A (en) * 2016-08-11 2017-01-25 深圳市宜搜科技发展有限公司 Difference storing method and system for application software installation package
CN106658475A (en) * 2015-10-30 2017-05-10 上海中兴软件有限责任公司 Over-the-air technology upgrading method an over-the-air technology upgrading device
CN106648766A (en) * 2016-12-07 2017-05-10 京信通信系统(中国)有限公司 Patch update package generation and differential upgrade method based on folder and device thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7343599B2 (en) * 2005-01-03 2008-03-11 Blue Lane Technologies Inc. Network-based patching machine
CN102402438B (en) * 2010-09-16 2014-07-09 金蝶软件(中国)有限公司 Method and device for automatically merging patch files and communication terminal
CN103399775A (en) * 2013-08-05 2013-11-20 北京华为数字技术有限公司 Hot patching method and hot patching equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831001A (en) * 2012-09-11 2012-12-19 北京百纳威尔科技有限公司 Method and device for manufacturing of software upgrading package and method and device for program upgrading
CN103744709A (en) * 2014-01-23 2014-04-23 华为技术有限公司 Patch loading method and device
CN106658475A (en) * 2015-10-30 2017-05-10 上海中兴软件有限责任公司 Over-the-air technology upgrading method an over-the-air technology upgrading device
CN105487907A (en) * 2015-12-07 2016-04-13 青岛海信电器股份有限公司 Difference package manufacturing method and device
CN105824643A (en) * 2016-03-25 2016-08-03 浪潮通用软件有限公司 Method for multiversion API adaptation of enterprise management software
CN106354525A (en) * 2016-08-11 2017-01-25 深圳市宜搜科技发展有限公司 Difference storing method and system for application software installation package
CN106648766A (en) * 2016-12-07 2017-05-10 京信通信系统(中国)有限公司 Patch update package generation and differential upgrade method based on folder and device thereof

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Broadband circularly polarized stacked patch antenna for universal UHF RFID applications";Bo-Shau Chen.etc;《2014 International Symposium on Antennas and Propagation Conference Proceedings》;20150129;正文第99-100页 *
"Patching a patch — Software updates using horizontal patching";Milosh Stolikj.etc;《2013 IEEE International Conference on Consumer Electronics (ICCE)》;20130328;正文第647-648页 *
"移动应用的实时增量更新";尹茸;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130115;I138-212 *
"风险测试方法在补丁测试中的应用研究";宋林;《中国优秀硕士学位论文全文数据库 信息科技辑》;20160315;I138-2448 *

Also Published As

Publication number Publication date
CN107239309A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
CN107239309B (en) Patch generation method and device, updating method, electronic device and storage medium
US11093268B2 (en) Portable aggregated information calculation and injection for application containers
CN108786112B (en) Application scene configuration method, device and storage medium
CN105204873B (en) A kind of terminal and application interface display methods
CN112765023B (en) Test case generation method and device
US9513762B1 (en) Static content updates
CN109669692B (en) Source code sharing method, server, computer readable storage medium and system
CN110399159A (en) Dispositions method, device, computer equipment and the storage medium of operating system
US10552171B2 (en) Efficient booting system
CN110597564A (en) Installation package construction and service component loading method, device and terminal equipment
CN115237436A (en) Application deployment method and device, electronic equipment and readable storage medium
CN109766123B (en) Application program packaging method and device
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
US20170322792A1 (en) Updating of operating system images
WO2021045723A1 (en) Accelerating application and sub-package installations
CN111290740B (en) Application program development method and device, computer equipment and storage medium
CN112235132A (en) Method, device, medium and server for dynamically configuring service
CN110989986A (en) Software template-based software generation method and device and computer equipment
CN112395096A (en) Remote function call processing method and device, electronic equipment and storage medium
CN111399926A (en) Method and device for downloading starting program
US20230142148A1 (en) Automated Deployment of Enterprise Archive with Dependency on Application Server Via Script
CN114860202A (en) Project operation method, device, server and storage medium
US11269596B2 (en) Automated microservice creation based on user interaction
WO2019157891A1 (en) Application installation method and application installer generating method
CN114253655A (en) Security container isolation method and device based on MIPS64 instruction set

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
GR01 Patent grant
GR01 Patent grant