Game client version switching method and device
By adjusting the configuration information and switching versions according to the identification information of the target game server in the HTML5 game client, and downloading the corresponding code and resources from the target game server, the problem of abnormal situations and large data downloads caused by inconsistent versions is solved, and a fast Switching and traffic alleviation.
Patent Information
- Application Number
- CN202110640597.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-08
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-06-08
AI Technical Summary
Existing HTML5 game clients will experience abnormalities when versions are inconsistent, and because all gameplay codes and resources are concentrated in one project, specific player groups need to download a large amount of data, which wastes traffic.
When the game client selects the target game server from the game server list, adjust the client configuration information according to the identification information of the target game server, switch to the target version, and download the corresponding game code and resources from the target game server to utilize different game servers. Store codes and resources for different gameplays to achieve flexible and fast version switching and reduce data download volume.
It achieves flexible and fast switching of game client versions, reduces data download volume, reduces traffic pressure, and improves the execution security and stability of game code.
Smart Images

Figure CN113384897B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and device for switching game client versions. Background Art
[0002] HTML5 (H5 for short), as a web game that can run on a browser, has been favored by more and more gamers.
[0003] Since H5 games are online games, the game client code version must be consistent with the server code version in order to run the game correctly and safely. If the game client code version is inconsistent with the server code version, various abnormal situations will occur during the game operation. In addition, in order to meet the game needs of different players, the game client often needs to provide different gameplay for different player groups, and the existing game clients usually concentrate all gameplay in the same project, which results in the game client needing to download the game code and game resources of all gameplays during the game loading process. This will cause the game client to download a large amount of data for some specific groups of players, wasting traffic.
[0004] Therefore, how to quickly switch the game client version and reduce the data download amount of the game client needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a game client version switching method and device, which can quickly switch the game client version and reduce the data download amount of the game client.
[0006] In a first aspect, an embodiment of the present application provides a method for switching game client versions, the method comprising:
[0007] When a game client selects a target game server from a game server list to log in, determining whether the version of the game client is the same as the version of the target game server; wherein the game server list includes a plurality of game servers, and different game servers store game codes and resources corresponding to different play modes;
[0008] If the version of the game client is different from the version of the target game server, adjusting the configuration information of the game client according to the identification information of the target game server;
[0009] Switching the game client from the current version to a target version, where the target version is a version corresponding to the adjusted configuration information of the game client;
[0010] Download the game code and resources corresponding to the target version from the target game server.
[0011] In a feasible implementation manner, adjusting the configuration information of the game client according to the identification information of the target game server includes:
[0012] Determining a version parameter of the target game server according to the identification information of the target game server;
[0013] According to the version parameters of the target game server, the version parameters in the uniform resource locator (URL) of the game client are adjusted.
[0014] In a feasible implementation manner, switching the game client from the current version to the target version includes:
[0015] The game client performs an address jump according to the URL adjusted by the game client to obtain the target version.
[0016] In a feasible implementation manner, after determining whether the version of the game client is the same as the version of the target game server, the method further includes:
[0017] When the version of the game client is the same as the version of the target game server, the game code and resources corresponding to the current version of the game client are downloaded from the target game server.
[0018] In a feasible implementation manner, the game client is a web page built based on HTML5.
[0019] In a second aspect, an embodiment of the present application provides a game client version switching device, the device comprising:
[0020] A judgment module, used to determine whether the version of the game client is the same as the version of the target game server when the game client selects a target game server from the game server list to log in; wherein the game server list includes multiple game servers, and different game servers store game codes and resources corresponding to different playing methods;
[0021] An adjustment module, configured to adjust the configuration information of the game client according to the identification information of the target game server when the version of the game client is different from the version of the target game server;
[0022] A switching module, used to switch the game client from a current version to a target version, where the target version is a version corresponding to the adjusted configuration information of the game client;
[0023] The download module is used to download the game code and resources corresponding to the target version from the target game server.
[0024] In a feasible implementation manner, the adjustment module is specifically used to:
[0025] Determining a version parameter of the target game server according to the identification information of the target game server;
[0026] According to the version parameter of the target game server, the version parameter in the uniform resource locator information URL of the game client is adjusted.
[0027] In a feasible implementation manner, the switching module is specifically used to:
[0028] The game client performs an address jump according to the URL adjusted by the game client to obtain the target version.
[0029] In a feasible implementation manner, the download module is further used for:
[0030] When the version of the game client is the same as the version of the target game server, the game code and resources corresponding to the current version of the game client are downloaded from the target game server.
[0031] In a feasible implementation manner, the game client is a web page built based on HTML5.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor and a memory;
[0033] The memory stores computer-executable instructions;
[0034] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the game client version switching method provided in the first aspect.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the game client version switching method provided in the first aspect is implemented.
[0036] The game client version switching method and device provided in the embodiment of the present application, when the game client selects the target game server from the game server list to log in, if the version of the game client is different from the version of the target game server, the configuration information of the game client is adjusted according to the identification information of the target game server, and after the game client is switched to the version corresponding to the adjusted configuration information, the game code and resources corresponding to the above target version are downloaded from the target game server. Among them, since the game codes and resources corresponding to different gameplays are stored in different game servers respectively, the game client can only download the game codes and resources corresponding to the gameplay developed for itself, which can not only flexibly and quickly switch the client version, but also reduce the data download amount of the game client and alleviate the traffic pressure of the game client. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0038] Figure 1 A schematic diagram of the architecture of a game client version switching system provided in an embodiment of the present application;
[0039] Figure 2 A flowchart of a method for switching game client versions provided in an embodiment of the present application;
[0040] Figure 3 Another schematic diagram of a process flow of a method for switching game client versions provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of a program module of a game client version switching device provided in an embodiment of the present application;
[0042] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, although the disclosure in the present application is introduced according to one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation method separately.
[0044] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0045] In addition, the terms "include" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components expressly listed but may include other components not expressly listed or inherent to such products or devices.
[0046] The term "module" as used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0047] HTML5 (H5 for short) is a language for building and presenting Internet content, and has been widely used in H5 game production. H5 games are also called Web games or web games. Unlike traditional online games that must download and install client applications to run, H5 games can be run directly on web pages without downloading and installing any client programs. Gamers only need to remember the web address of an H5 game to play the game on any PC that can access the Internet.
[0048] Since most of the existing H5 games are online games, the game client code version must be consistent with the server code version in order to run the game correctly and safely. If the game client code version is inconsistent with the server code version, various abnormal situations will occur during the game operation, such as abnormal display of the game client interface due to inconsistent data format, and inability of the game client and game server to communicate normally due to inconsistent verification methods.
[0049] In the process of game operation, facing the different needs of game players, game developers need to provide differentiated game experiences. Therefore, in order to meet different game needs, the game client needs to quickly provide corresponding game versions for different player groups.
[0050] In addition, in order to meet the gaming needs of different players, game clients often need to provide different gameplays for different player groups. Existing game clients usually concentrate all gameplays in the same project. During the development process, each gameplay is developed in this project. Finally, the game client provided to players contains the game code and resources for all gameplays. The opening and closing of different gameplays are controlled by the logic of the game client itself, or by the server through the interaction of game data.
[0051] However, after the game codes and resources for all gameplays are published in the same game client, the game client needs to download the game codes and game resources for all gameplays when loading the game. This will cause a large amount of data download for some specific groups of players, wasting traffic.
[0052] In order to solve the above technical problems, a method for switching game client versions is provided in an embodiment of the present application. When the game client selects a target game server from a list of game servers to log in, if the version of the game client is different from the version of the target game server, the configuration information of the game client is adjusted according to the identification information of the target game server, and after the game client is switched to the version corresponding to the adjusted configuration information, the game code and resources corresponding to the above target version are downloaded from the target game server. Among them, since the game codes and resources corresponding to different gameplays are respectively stored in different game servers, the game client can only download the game codes and resources corresponding to the gameplay developed for itself, which can not only flexibly and quickly switch the client version, but also reduce the data download amount of the game client and alleviate the traffic pressure of the game client. It is specifically described through the following embodiments:
[0053] Reference Figure 1 , Figure 1 This is a schematic diagram of the architecture of a game client version switching system provided in an embodiment of the present application. The game client version switching system provided in the present application can be applied to Figure 1 The hardware environment shown is composed of a game server 102 and a terminal 104.
[0054] like Figure 1As shown, the game server 102 is connected to the terminal 104 through a network, and the network includes but is not limited to: a wide area network, a metropolitan area network or a local area network. The terminal 104 is not limited to a PC (personal computer), a mobile phone, a tablet computer, etc. The game server 102 includes but is not limited to a single-channel server, a multi-channel server and a distributed server.
[0055] The game client version switching method provided in the embodiment of the present application can be executed by the terminal 104, or can be executed jointly by the server 102 and the terminal 104. For example, in some embodiments, the user sends an access request to the game server 102 through the game client in the terminal 104; after receiving the access request, the game server 102 generates a task item corresponding to the terminal 104, and automatically allocates the task item to the online server or the offline server according to the type of the generated task item.
[0056] Reference Figure 2 , Figure 2 A flowchart of a method for switching game client versions provided in an embodiment of the present application is provided. In a feasible implementation, the method includes:
[0057] S201. When a game client selects a target game server from a game server list to log in, determine whether the version of the game client is the same as the version of the target game server.
[0058] Among them, the above-mentioned game client is built based on HTML5, which can be understood as a game webpage corresponding to the game server and providing game services to game players.
[0059] The game server list includes multiple game servers, and different game servers store game codes and resources corresponding to different gameplays. That is, different game servers correspond to different player groups, and the versions of different game clients can be determined according to the version configuration in the game server list.
[0060] In an embodiment of the present application, after the player opens the game, the game client first downloads only the general client initialization code, and then downloads the game client configuration file and the game server list. When the player selects one of the game servers from the game server list and performs login verification, the version information in the game client configuration file is matched with the version information of the currently logged-in target game server to determine whether the version of the game client is the same as the version of the target game server.
[0061] S202: If the version of the game client is different from the version of the target game server, adjust the configuration information of the game client according to the identification information of the target game server.
[0062] In a feasible implementation manner, the identification information of the target game server may be a version number or ID of the target game server.
[0063] When the version of the game client is different from the version of the target game server, the game client can adjust the configuration information of the game client according to the version number of the target game server and certain rules.
[0064] S203: Switch the game client from the current version to the target version, where the target version is a version corresponding to the adjusted configuration information of the game client.
[0065] In an embodiment of the present application, after the game client has new configuration information, it can jump to the new version according to the new configuration information.
[0066] S204: Download game codes and resources corresponding to the target version from the target game server.
[0067] Since different game servers correspond to game codes and resources for different player groups, in an embodiment of the present application, the game client will only download game codes and resources related to the game client version, thereby helping to minimize the traffic required to be downloaded by the game client.
[0068] In a feasible implementation, the present application can also support rapid iteration of gameplay and experience testing of some players.
[0069] For example, when it is necessary to make a small amount of changes to gameplay A for a player group with characteristic B to form gameplay A', in order to test the experience optimization effect of gameplay A' on the player group with characteristic B, a code branch can be created based on the game code of gameplay A, and then the new branch code can be quickly modified to form gameplay A'. After gameplay A' is formed, the game code and resources of gameplay A' are published through the relevant game server, where the game server only allows the player group with characteristic B to download the game code and resources to experience the iterated gameplay A'.
[0070] In some embodiments, the game codes and resources corresponding to different game client versions of the gameplay can be isolated at the code level, that is, the game codes of game clients of different player groups do not need to be coupled together, which helps to improve the security and stability of game code execution and reduce the probability of problems arising from the coupling of different versions of code during gameplay iterations.
[0071] For example, gameplay A can derive multiple micro-iteration gameplays based on the characteristics of different players, including gameplay A1, gameplay A2, gameplay A3, etc. According to the technical solution provided in the embodiment of the present application, the game codes of these gameplays are all independently managed by different game servers, and are decoupled from each other at the code file level when they are released. Therefore, when the game clients of different player groups log in to the server, they will only download the game codes and resources corresponding to the gameplay they need, eliminating the situation where the client operation has problems due to logical coupling between two gameplays.
[0072] The game client version switching method provided in the embodiment of the present application is that when the game client selects the target game server from the game server list to log in, if the version of the game client is different from the version of the target game server, the configuration information of the game client is adjusted according to the identification information of the target game server, and after the game client is switched to the version corresponding to the adjusted configuration information, the game code and resources corresponding to the above target version are downloaded from the target game server. Among them, since the game codes and resources corresponding to different gameplays are stored in different game servers respectively, the game client can only download the game codes and resources corresponding to the gameplay developed for itself, which can not only flexibly and quickly switch the client version, but also reduce the data download amount of the game client and alleviate the traffic pressure of the game client.
[0073] Based on the contents described in the above embodiments, Figure 3 , Figure 3 Another flowchart of the method for switching the game client version provided in the embodiment of the present application is provided. In a feasible implementation, the method includes:
[0074] S301. The game client selects a target game server from a game server list and logs in.
[0075] In the embodiment of the present application, for ease of understanding, it is assumed that the game client has two versions, namely, version release and version test. Then the game server list will correspond to two game servers, and the identification information corresponding to the two game servers is "release" and "test" respectively. The process of the game client logging into the game server can be as follows:
[0076] After the player opens the game, the game client first downloads only the general client initialization code, and then downloads the game client configuration file and the game server list (release and test). The player then selects one of the game servers from the game server list and clicks the login button to log in.
[0077] S302: Determine whether the version of the game client is the same as the version of the target game server; if they are the same, execute S303; otherwise, execute S304.
[0078] In the embodiment of the present application, assuming that the version of the game client is release, when the game client logs in to the target game server and performs login verification, it is determined whether the identification information of the currently logged-in target game server is "release"; if so, it can be considered that the version of the game client is the same as the version of the target game server; if the identification information of the currently logged-in target game server is "test", it can be considered that the version of the game client is different from the version of the target game server.
[0079] S303: Download the game code and resources corresponding to the current version of the game client from the target game server.
[0080] In an embodiment of the present application, when the version of the game client is the same as the version of the target game server, it can be considered that the version of the game client does not need to be switched. At this time, the game code and resources corresponding to the current version of the game client can be directly downloaded from the target game server.
[0081] S304: Determine the version parameters of the target game server according to the identification information of the target game server, and adjust the version parameters in the URL of the game client according to the version parameters of the target game server.
[0082] In the embodiment of the present application, when the version of the game client is different from the version of the target game server, it can be considered that the version of the game client needs to be switched to version test.
[0083] Optionally, when it is determined that the version of the game client needs to be switched to version test, a prompt box may pop up in the game client to remind the player that the client version switching operation is about to be performed, and the switching operation may be performed after receiving the player's confirmation instruction.
[0084] In a feasible implementation, when the version of the game client is switched to version test, the channel parameter in the current URL of the game client can be modified to "test", and then the new channel parameter and other parameters of the original URL can be spliced into a new URL of the game client.
[0085] For example, assuming that the version of the game client is release, the web link of the game client is: https: / / abcd.com / game / ? channel=release. When it is determined to switch the version of the game client to version test, the web link of the game client can be modified to: https: / / abcd.com / game / ? channel=test.
[0086] S305: redirect the game client to the URL adjusted by the game client to obtain the target version.
[0087] In the embodiment of the present application, after adjusting the version parameter in the URL of the game client, the game client uses the new URL to jump to the address and can switch to version test.
[0088] S306: Download game codes and resources corresponding to the target version from the target game server.
[0089] In the embodiment of the present application, after switching to version test, the game client can download relevant game codes and resources from the game server with identification information "test".
[0090] It can be understood that the game client version switching method provided in the embodiment of the present application can also realize switching between more versions. The specific implementation method can refer to the description in the above embodiment and will not be repeated in this embodiment.
[0091] Based on the contents described in the above embodiments, a game client version switching device is also provided in the embodiments of the present application. Figure 4 , Figure 4 This is a schematic diagram of a program module of a game client version switching device provided in an embodiment of the present application, wherein the game client version switching device comprises:
[0092] The judgment module 401 is used to determine whether the version of the game client is the same as the version of the target game server when the game client selects a target game server from the game server list to log in; wherein the game server list includes multiple game servers, and different game servers store game codes and resources corresponding to different gameplays.
[0093] The adjustment module 402 is used to adjust the configuration information of the game client according to the identification information of the target game server when the version of the game client is different from the version of the target game server.
[0094] The switching module 403 is used to switch the game client from the current version to the target version, where the target version is the version corresponding to the adjusted configuration information of the game client.
[0095] The download module 404 is used to download the game code and resources corresponding to the target version from the target game server.
[0096] The game client version switching device provided in the embodiment of the present application, when the game client selects the target game server from the game server list to log in, if the version of the game client is different from the version of the target game server, the configuration information of the game client is adjusted according to the identification information of the target game server, and after the game client is switched to the version corresponding to the adjusted configuration information, the game code and resources corresponding to the above target version are downloaded from the target game server. Among them, since the game codes and resources corresponding to different gameplays are stored in different game servers respectively, the game client can only download the game codes and resources corresponding to the gameplay developed for itself, which can not only flexibly and quickly switch the client version, but also reduce the data download amount of the game client and alleviate the traffic pressure of the game client.
[0097] In a feasible implementation manner, the adjustment module 402 is specifically configured to:
[0098] According to the identification information of the target game server, the version parameters of the target game server are determined; according to the version parameters of the target game server, the version parameters in the URL of the game client are adjusted.
[0099] In a feasible implementation manner, the switching module 403 is specifically configured to:
[0100] Redirect to the target version according to the URL adjusted by the game client.
[0101] In a feasible implementation manner, the download module 404 is further used for:
[0102] When the version of the game client is the same as the version of the target game server, the game code and resources corresponding to the current version of the game client are downloaded from the target game server.
[0103] In a feasible implementation manner, the game client is a web page built based on HTML5.
[0104] It should be noted that the specific execution contents of the determination module 401, the adjustment module 402, the switching module 403 and the downloading module 404 described in the embodiment of the present application can be referred to in Figures 2 to 3 The relevant contents in the illustrated embodiment will not be described in detail here.
[0105] Furthermore, based on the contents described in the above embodiments, an electronic device is also provided in the embodiments of the present application, which includes at least one processor and a memory; wherein the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory to implement the various steps in the game client version switching method described in the above embodiments. For details, please refer to the above embodiments, and this embodiment will not be repeated here.
[0106] In order to better understand the embodiments of the present application, refer to Figure 5 , Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0107] like Figure 5 As shown, the electronic device 50 of this embodiment includes: a processor 501 and a memory 702; wherein:
[0108] Memory 502, used to store computer-executable instructions;
[0109] The processor 501 is used to execute the computer-executable instructions stored in the memory to implement the various steps in the game client version switching method described in the above embodiment. The details can be referred to the above embodiment, and this embodiment will not be repeated here.
[0110] Optionally, the memory 502 may be independent or integrated with the processor 501 .
[0111] When the memory 502 is independently provided, the device further includes a bus 503 for connecting the memory 502 and the processor 501 .
[0112] Furthermore, based on the contents described in the above embodiments, a computer-readable storage medium is also provided in the embodiments of the present application, and computer execution instructions are stored in the computer-readable storage medium. When the processor executes the computer execution instructions, the various steps in the game client version switching method described in the above embodiments are implemented. For details, please refer to the above embodiments, and this embodiment will not be repeated here.
[0113] Furthermore, based on the contents described in the above embodiments, a computer program product is also provided in the embodiments of the present application, including a computer program. When the computer program is executed by a processor, the various steps in the game client version switching method described in the above embodiments can be implemented. The details can be referred to the above embodiments, and this embodiment will not be repeated here.
[0114] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0117] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0118] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0119] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0120] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0121] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0122] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0123] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for switching game client versions, characterized in that: The method comprises: When a game client selects a target game server from a game server list to log in, determine whether the version of the game client is the same as the version of the target game server; wherein the game server list includes multiple game servers, and different game servers store game codes and resources corresponding to different gameplays, and the game codes and resources corresponding to the gameplays of different game client versions are isolated at the code level, and the game client is a web page built based on HTML5; If the version of the game client is different from the version of the target game server, adjusting the configuration information of the game client according to the identification information of the target game server; Switching the game client from the current version to a target version, where the target version is a version corresponding to the adjusted configuration information of the game client; Downloading game code and resources corresponding to the target version from the target game server; The adjusting the configuration information of the game client according to the identification information of the target game server includes: Determining a version parameter of the target game server according to the identification information of the target game server; According to the version parameter of the target game server, adjusting the version parameter in the uniform resource locator information URL of the game client; The switching of the game client from the current version to the target version includes: The game client performs an address jump according to the URL adjusted by the game client to obtain the target version.
2. The method according to claim 1, characterized in that: After determining whether the version of the game client is the same as the version of the target game server, the method further includes: If the version of the game client is the same as the version of the target game server, the game code and resources corresponding to the current version of the game client are downloaded from the target game server.
3. A game client version switching device, characterized in that: The device comprises: A judgment module is used to determine whether the version of the game client is the same as the version of the target game server when the game client selects a target game server from the game server list to log in; wherein the game server list includes multiple game servers, and different game servers store game codes and resources corresponding to different gameplays, and the game codes and resources corresponding to the gameplays of different game client versions are isolated at the code level; the game client is a web page built based on HTML5; An adjustment module, configured to adjust the configuration information of the game client according to the identification information of the target game server when the version of the game client is different from the version of the target game server; A switching module, used to switch the game client from a current version to a target version, where the target version is a version corresponding to the adjusted configuration information of the game client; A download module, used to download game codes and resources corresponding to the target version from the target game server; The adjustment module is specifically used for: Determining a version parameter of the target game server according to the identification information of the target game server; According to the version parameter of the target game server, adjusting the version parameter in the uniform resource locator information URL of the game client; The switching module is specifically used for: The game client performs an address jump according to the URL adjusted by the game client to obtain the target version.
4. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the game client version switching method as described in claim 1 or 2.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the game client version switching method as described in claim 1 or 2 is implemented.
6. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the game client version switching method according to claim 1 or 2 is implemented.
