Universal game version increment updating system and method
Technical Field
The invention relates to a universal game version increment updating system and a universal game version increment updating method, and belongs to the field of computer game updating.
Background
The distribution server is called a content distribution network. The basic idea is to avoid bottlenecks and links possibly influencing data transmission speed and stability on the Internet as far as possible, so that content transmission is faster and more stable. By placing node servers at various places of the network to form a layer of intelligent virtual network on the basis of the existing internet, the distribution server system can redirect the request of the user to the service node closest to the user in real time according to the network flow, the connection of each node, the load condition, the distance to the user, the response time and other comprehensive information. The method aims to enable the user to obtain the required content nearby, solve the problem of congestion of the Internet network and improve the response speed of the user for accessing the website.
MD5, message-digest algorithm 5, is used to ensure that the message is transmitted in a complete and consistent manner. The method has the characteristics that the length of the calculated MD5 value is fixed for data with any length. Easy to calculate: it is easy to calculate the MD5 value from the raw data. Resistance to modification: any change to the original data, even if only 1 byte is modified, can result in a great difference in the value of MD 5. Strong collision resistance: knowing the original data and its MD5 value, it is very difficult to find a data with the same MD5 value (i.e., counterfeit data).
The prior art has the following problems: the game version updating system is often the most important system in the game system, because the loss of a player before entering a game login interface is counted up to more than ten percent according to the relevant data of game retention, the player needs to spend a large amount of time and flow to download the whole game package for installation because the game is not updated with the system, or the player quits the game because the interface is single in appearance after the time is too long in the updating process and the player feels a lot of trouble.
The common scheme adopted by the game is either not to make a version increment updating system or to adopt an MD5 resource comparison updating system.
MD5 resource alignment update system: all resources of the latest version are uploaded to a server side and MD5 files corresponding to the resources are generated, a client side maintains the MD5 file of the current version, a resource list needing to be downloaded is generated by comparing the MD5 file of the client side with the MD5 file of the server side when a game is started, then the resources in the resource list are downloaded and covered in a local persistent path of the client side, and the resources are loaded into the game if the persistent path has the corresponding resources after the game is started. As above, the MD5 file part content, each line uses the MD5 of the resource as the primary key, the picture relative path, MD5 value, whether it is folder identification, the server download address is combined into a list as the value. The defects of adopting the MD5 resource ratio to update the system are as follows 1-4:
1. the client needs to store one MD5 file, generally, commercial game resources are as high as ten thousands, one line is formed, and the MD5 file needs to occupy about 4M space of the installation package size;
2. the game starting needs to download the server list MD5 file and traverse each resource MD5, if the MD5 value does not exist in the client MD5 file, the resource is listed in the list needing to be downloaded, and the process can take about one minute;
3. the game downloads the resource list as required and downloads the corresponding resources one by one, and because the HTTP link request needs to be established when downloading one resource in the process, the process is a critical bottleneck point which consumes huge time, and if the resource needing to be updated reaches hundreds, the process generally needs more than ten minutes;
4. the downloading process is interrupted in the game, and in order to support the function of resuming the game breakpoint next time, the game needs to record which files are updated last time and enter the client, which causes inconvenience and is easy to lose and cause bug.
Disclosure of Invention
Aiming at the problems in the prior art, the technical scheme of the invention provides a universal game version increment updating system and a universal game version increment updating method, which deeply analyze the current situation and the caused reasons of the realization of the common game version updating system, analyze the specific requirements of a user player on game updating, and summarize a set of universal game version increment updating system so as to achieve the purposes of greatly shortening the development period of the version increment updating system, enhancing the maintainability and reusability of codes, and enhancing the experience and performance of games, thereby increasing the retention rate of the games and reducing the unnecessary time and flow loss.
The technical scheme of the invention comprises a universal game version increment updating system, which comprises a publishing terminal, a client terminal and a distribution server, and is characterized in that the system comprises: the updating preparation module is used for creating an updating version list, storing the game version information file and the updating information file into the version list, and decomposing the game resource program set into byte streams and converting the byte streams into script codes; the updating interface module is used for packaging the script converted by the updating preparation module into an updating resource file, generating a configuration file for configuring the corresponding updating resource file, creating an interactive interface for custom setting the updating resource file to be issued, and uploading the required updating resource file to the distribution server; the version updating module is used for acquiring the updated resource file of the distribution server, analyzing and acquiring the version information of the updated resource, and executing corresponding resource file replacement and installation according to the version information; and the code reflection module is used for dynamically loading and dynamically executing and using the program code under the game program after the version updating module is replaced and installed.
The incremental update system for game versions, wherein the update preparation module comprises: the updating directory submodule is used for creating an updating version information directory list and storing different version information files, wherein the updating version information directory list comprises an updating information file, an incremental updating information file and a historical updating file; the updating naming submodule is used for creating a naming rule for the version information file of the updating directory submodule and comprises the steps of marking the updating file of the version information increment by using sequentially increasing digital identification codes; and the resource integration submodule is used for integrating the updated resource file which needs to be issued, and comprises the steps of decomposing video, audio, pictures and game program codes required by the game into byte streams, converting the byte streams into script codes and putting the script codes into the corresponding version information file.
The incremental updating system of the game version comprises an updating interface module and a game version updating module, wherein the updating interface module comprises: the interactive interface submodule is used for carrying out self-defined selection on the version information file called by the updated resource file to be released by using an interactive interface, providing compiling script mode selection, platform releasing mode selection and updated resource file packaging mode selection, and uploading the finally packaged game updated file to a distribution server; the background configuration submodule is used for configuring according to the updating resource file which is selected by the interactive interface submodule in a user-defined way, and comprises a configuration file for creating an updating file, a new version information file and an increment updating version information file; and the background packaging submodule is used for packaging the updated resource file which is configured by the background configuration submodule into a release file.
The game version increment updating system comprises a version updating module and a version updating module, wherein the version updating module comprises: the updating comparison submodule is used for downloading the corresponding updating resource file from the distribution server, analyzing the updating resource file to obtain an updating version information file and a corresponding updating configuration file, preprocessing the version information file and the updating version information file under the client and performing comparison; and the updating submodule is used for acquiring the comparison result of the updating comparison submodule to correspondingly replace and install the file calling updating resource file under the client.
The incremental updating system of the game version, wherein the code reflection module further comprises: the method is used for performing reflective loading on the replaced and installed updated resource, and comprises the steps of dynamically and reflectively loading game codes, and interpreting and executing the game program codes under the updated resource by using script codes.
The technical scheme of the invention also comprises a universal game version increment updating method, which is characterized by comprising the following steps: creating an update version list, storing the game version information file and the update information file into the version list, and decomposing the game resource program set into byte streams and converting the byte streams into script codes; the script converted by the updating preparation module is packaged into an updating resource file, a configuration file is generated for configuring the corresponding updating resource file, an interactive interface is created for custom setting the updating resource file to be issued, and the required updating resource file is uploaded to a distribution server; acquiring an updated resource file of the distribution server, analyzing and acquiring updated resource version information, and executing corresponding resource file replacement and installation according to the version information; and after the version updating module is replaced and installed, dynamically loading the program code under the game program and dynamically executing and using the program code.
Further, the method also includes: creating an updated version information directory list for storing different version information files, including an updated information file, an incremental updated information file and a historical updated file; creating a naming rule for the version information file of the update directory submodule, wherein the naming rule comprises the step of marking the update file of the version information increment by using sequentially increasing digital identification codes; integrating the updated resource files to be released, including decomposing the video, audio, picture and game program codes required by the game into byte streams, converting the byte streams into script codes and putting the script codes into corresponding version information files.
Further, the method also includes: the interactive interface is used for carrying out user-defined selection on the version information file of the updated resource file to be released, providing compiling script mode selection, platform releasing mode selection and updated resource file packaging mode selection, and uploading the finally packaged game updating file to the distribution server; configuring according to the updating resource file selected by the interactive interface submodule in a user-defined way, wherein the configuration file comprises a configuration file for creating an updating file, a new version information file and an increment updating version information file; and packaging the configured updated resource file of the background configuration submodule into a release file.
Further, the method also includes: downloading a corresponding updated resource file from the distribution server, analyzing the updated resource file to obtain an updated version information file and a corresponding updated configuration file, preprocessing the version information file and the updated version information file under the client and performing comparison; and obtaining the comparison result of the update comparison submodule to correspondingly replace and install the file calling update resource file under the client.
Further, the method also includes: the method is used for performing reflective loading on the replaced and installed updated resource, and comprises the steps of dynamically and reflectively loading game codes, and interpreting and executing the game program codes under the updated resource by using script codes.
The invention has the beneficial effects that: (1) the visual resource packaging and publishing interface is operated in a one-key mode, the interface is easy to operate and provides an information viewing window, direct packaging and publishing can be conveniently planned, and the development period of a version increment updating system is greatly shortened. (2) The version increment updating system can be conveniently transplanted to different game items, other functions can be conveniently expanded, and the maintainability and reusability of codes are enhanced. (3) Enhancing the experience and performance of the game to increase the game survival rate and reduce wasted time and traffic loss.
Drawings
FIG. 1 is a general block diagram according to an embodiment of the present invention;
fig. 2 shows a flow diagram according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments. The invention relates to a universal game version increment updating system and method for updating games such as mobile phone games, web games and the like.
Fig. 1 is a general block diagram according to an embodiment of the present invention, which generally includes a distribution end, a client, and a distribution server. The updating preparation module is used for creating an updating version list, storing the game version information file and the updating information file into the version list, decomposing a game resource program set into byte streams and converting the byte streams into script codes; the updating interface module is used for packaging the script converted by the updating preparation module into an updating resource file, generating a configuration file for configuring the corresponding updating resource file, creating an interactive interface for custom setting the updating resource file to be issued, and uploading the required updating resource file to the distribution server; the version updating module is used for acquiring the updated resource file of the distribution server, analyzing and acquiring the version information of the updated resource, and executing corresponding resource file replacement and installation according to the version information; and the code reflection module is used for dynamically loading and dynamically executing and using the program code under the game program after the version updating module is replaced and installed.
Fig. 2 shows operation steps in the resource packaging and publishing management process of the flowchart according to the embodiment of the present invention, a visual resource packaging and publishing interface is compiled, all the steps can be completed by clicking to publish immediately, the resource is uploaded to the corresponding distribution server, and then the required resource is updated according to the incremental updating system execution process. The core idea of the system is to directly download the compressed delta patch package of which the current version needs to be updated through version number comparison, and decompress the compressed delta patch package to a persistent path for preferential calling. According to the flowchart shown in fig. 2, the version information file records the installation package version number and the resource version number. The persistent path is a path in which the mobile terminal can perform read-write storage, so that resources on the network or in the installation package can be stored under the path for heat demand. The specific execution steps further comprise the following steps 1-6:
1. and downloading the version information file on the distribution server, and loading the version information file in the installation package and under the persistent path.
2. The method comprises the steps that when a game is entered, the resource version number of a current installation package and the resource version number of a persistent path are compared, and if the resource version number of the installation package is large, the version updating resources of the installation package are completely covered by the resources of the persistent path;
3. then comparing the persistent path with the version number of the installation package on the distribution server, if the version number of the persistent path installation package is large, the installation package does not need to be updated, otherwise, the installation package is downloaded and the game installation is quitted;
4. secondly, comparing the resource version numbers on the persistent path and the distribution server, if the resource version number of the persistent path is large, the resources do not need to be updated, otherwise, downloading the corresponding incremental patch package, decompressing to the persistent path and covering the old resources;
5. the installation package or the incremental patch package is downloaded by adopting a network request, the breakpoint resume function is supported, and the original progress downloading can be continued when the downloading is interrupted and the game is entered next time;
6. after the patch package is completely downloaded and covered, for game resources, the game preferentially reads the resources in the persistent path, and if the resources in the installation package are not read any more, the game can read the resources in the persistent path; for game codes, a program set DLL needs to be loaded into a game for dynamic loading (on an android) and used, and because an ios system does not allow the code to be loaded in a reflection mode, game logic can be developed by using the lua language and used as resource update, and then the game code is loaded into the game to be directly interpreted and executed.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiment, and the present invention shall fall within the protection scope of the present invention as long as the technical effects of the present invention are achieved by the same means. The invention is capable of other modifications and variations in its technical solution and/or its implementation, within the scope of protection of the invention.