Cross-server method, device and equipment for online games

By creating a shared database in online games, storing and reading game server identifiers, it solves the problem of data acquisition complexity in the cross-server process, simplifies cross-server functions and reduces the difficulty of logical coupling.

CN112604270BActive Publication Date: 2024-10-29BEIJING BEINGFUNGAMES TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011604956.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2024-10-29
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

In the existing technology, during the cross-server process of online games, it is necessary to obtain the game character data required for cross-server from the source game server, resulting in complex cross-server functions and difficulty in coupling new function logic to the business logic of the cross-server server.

Method used

By obtaining the access request information for establishing a connection between the target game server and the cross-server server during the running of the game, create a shared database, store the database table formed by the game server identification, associate the game character data of the game server, and read the target server in the database table The identifier obtains the game character data of the target game server and performs game operations on the game client.

Benefits of technology

It simplifies the cross-server process, reduces the difficulty of coupling game business logic and cross-server server business logic, and avoids the need to obtain cross-server data from the source game server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112604270B_ABST
    Figure CN112604270B_ABST
Patent Text Reader

Abstract

The present application discloses a cross-server method, device and equipment for online games, which relates to the field of computer technology, so that the cross-server process does not need to obtain the game character data required for cross-server from the source game server, which can simplify the cross-server function and reduce the coupling difficulty of the game business logic and the business logic of the cross-server server. The method includes: responding to the trigger instruction of the first login request of the game client, obtaining the request access information for the target game server to establish a connection with the cross-server server during the game operation; using the game data recorded by each game server to create a shared database, and the shared server stores a database table formed by the game server identifier; by reading the target game server identifier in the database table, obtaining the game character data of the target game server associated with the target game server identifier; according to the game character data corresponding to the target game server, executing the game operation of the game client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a cross-server method, device and equipment for online games. Background Art

[0002] As the number of players in online games continues to increase, due to the limitations of computer performance and resources, multiple servers will be opened. Each server is an independent game world. Players must select a server before entering the game. After entering the game, the characters created can only play in the selected server. Therefore, players in each server can only interact with players in the server, and cannot communicate, compete or collaborate with players in other servers.

[0003] In game scenarios that require multi-person collaboration, cross-server requirements are often encountered. Players from different servers can all participate in the game together in the same game scenario. In the prior art, each server has its own database. When accessing game character data, the cross-server process needs to obtain it through the source game server. Taking the cross-server game login scenario as an example, after the cross-server server agrees to the cross-server request, all data access logic needs to be written separately, and the game character data required for cross-server is obtained from the source game server, which makes the cross-server functions complicated and the logic of new functions is difficult to couple to the business logic of the cross-server server. Summary of the invention

[0004] In view of this, the present application provides a cross-server method, device and equipment for online games, the main purpose of which is to solve the problem in the prior art that the data required for cross-server is obtained from the source server, resulting in complex cross-server functions and the difficulty in coupling the logic of new functions to the business logic of the central server.

[0005] According to a first aspect of the present application, a cross-server method for an online game is provided, comprising:

[0006] In response to a trigger instruction of a first login request from a game client, obtaining access request information for establishing a connection between a target game server and a cross-server server during game operation, wherein the first login request is used to request to log in to the cross-server server, and the access request information carries an identifier of the target game server;

[0007] Using the game data recorded by each game server, a shared database is created, wherein the shared server stores a database table formed by game server identifiers, wherein the game server identifiers are associated with game character data of the game servers;

[0008] Obtaining game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table;

[0009] The game operation of the game client is executed according to the game character data corresponding to the target game server.

[0010] In another embodiment, the database table defines a key value format formed by different attribute identifiers of the game character, and the step of obtaining the game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table specifically includes:

[0011] Determine the attribute identifier of the game character mapped by the target game server by reading the target game server identifier in the database table;

[0012] The target game server maps the attribute identifier of the game character to obtain the game character data of the target game server associated with the target game server identifier.

[0013] In another embodiment, the attribute identifier of the game character includes at least the service area identifier of the game character and the self-increment identifier of the game character, the key value format includes at least the service area identifier of the game character, the game character table name and the game character identifier, and the number of bits of the game character identifier stores the service area identifier of the game character and the self-increment identifier of the game character.

[0014] In another embodiment, after executing the game operation of the game client according to the game character data corresponding to the target game server, the method further includes:

[0015] In response to a trigger instruction of a target game server merge request, a service area identifier of a game server to be merged and a game character mapped thereto is determined by using a pre-set server merge configuration table;

[0016] According to the service area identifier, the interface information of the target game server in the shared database is modified to the interface information of the game server to be merged.

[0017] In another embodiment, after modifying the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier, the method further includes:

[0018] According to the service area identifier, the game character data corresponding to the target game server is queried and deleted from the shared database.

[0019] In another embodiment, before obtaining the request access information for establishing a connection between the target game server and the cross-server server during the game running process in response to the trigger instruction of the first login request of the game client, the method further includes:

[0020] In response to a trigger instruction of a cross-server request of a target game server, a mapping relationship between a pre-configured game server and a cross-server is used to obtain a list of game server identifiers that are allowed to access the cross-server, wherein the game server identifier list records game server identifiers that are allowed to create characters on the cross-server;

[0021] According to the game server identification list allowed to access the cross-server server, a cross-server connection is established between the target game server and the cross-server server.

[0022] In another embodiment, establishing a cross-server connection between the target game server and the cross-server server according to the game server identification list allowed to access the cross-server server specifically includes:

[0023] Obtaining the target game server identifier carried by the cross-server request, and determining whether the target game server identifier is in the game server identifier list;

[0024] If so, a cross-server connection is established between the target game server and the cross-server server.

[0025] According to a second aspect of the present application, a cross-server method for an online game is provided, comprising:

[0026] In response to a trigger instruction of a cross-server request from a game client, a cross-server request is sent to a cross-server server;

[0027] If a response message to the cross-server request is received, the login address carried in the response message will be pushed to the game client, so that the game client generates a login request according to the login address and jumps the game page to the login page of the cross-server server.

[0028] In another embodiment, after sending the cross-server request to the cross-server server in response to the trigger instruction of the cross-server request of the game client, the method further includes:

[0029] In response to a trigger instruction of a second login request of a game client, determining whether the game client has logged in on the cross-server server, the second login request being used to log in to a target game server;

[0030] If so, the second login request of the game client is rejected.

[0031] According to a third aspect of the present application, a cross-server device for an online game is provided, comprising:

[0032] A first acquisition unit is used to respond to a trigger instruction of a first login request from a game client and acquire access information of a request for establishing a connection between a target game server and a cross-server server during game operation, wherein the first login request is used to request to log in to the cross-server server;

[0033] A creation unit, used to create a shared database using the game data recorded by each game server, wherein the shared server stores a database table formed by game server identifiers, wherein the game server identifiers are associated with game character data of the game servers;

[0034] A second acquisition unit is used to acquire the game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table;

[0035] The execution unit is used to execute the game operation of the game client according to the game character data corresponding to the target game server.

[0036] In another embodiment, the database table defines a key value format formed by different attribute identifiers of the game character, and the second acquisition unit includes:

[0037] A determination module, configured to determine an attribute identifier of a game character mapped by the target game server by reading the target game server identifier in the database table;

[0038] The acquisition module is used to use the attribute identifier of the target game server mapping game character to acquire the game character data of the target game server associated with the target game server identifier.

[0039] In another embodiment, the attribute identifier of the game character includes at least the service area identifier of the game character and the self-increment identifier of the game character, the key value format includes at least the service area identifier of the game character, the game character table name and the game character identifier, and the number of bits of the game character identifier stores the service area identifier of the game character and the self-increment identifier of the game character.

[0040] In another embodiment, the apparatus further comprises:

[0041] A determination unit, configured to determine, after executing the game operation of the game client according to the game character data corresponding to the target game server, a service area identifier where the game character mapped by the game server to be merged is located by using a preset server merging configuration table in response to a trigger instruction of a target game server merging request;

[0042] The merging unit is used to modify the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier.

[0043] In another embodiment, the apparatus further comprises:

[0044] A deleting unit is used to query and delete the game character data corresponding to the target game server from the shared database according to the service area identifier after modifying the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier.

[0045] In another embodiment, the apparatus further comprises:

[0046] A third acquisition unit is used to respond to the trigger instruction of the cross-server request of the target game server, and obtain the request access information for establishing a connection between the target game server and the cross-server server during the game operation, before responding to the trigger instruction of the first login request of the game client, and using the mapping relationship between the pre-configured game server and the cross-server to obtain the game server identification list that is allowed to access the cross-server server, wherein the game server identification list records the game server identification that is allowed to create a character on the cross-server server;

[0047] An establishing unit is used to establish a cross-server connection between a target game server and the cross-server server according to the game server identification list allowed to access the cross-server server.

[0048] In another embodiment, the establishing unit comprises:

[0049] A determination module, used to obtain a target game server identifier carried by the cross-server request, and determine whether the target game server identifier is in the game server identifier list;

[0050] An establishing module is used to establish a cross-server connection between the target game server and the cross-server server if so.

[0051] According to a fourth aspect of the present application, a cross-server device for an online game is provided, comprising:

[0052] A sending unit, configured to send a cross-server request to a cross-server server in response to a triggering instruction of a cross-server request from a game client;

[0053] A push unit is used to push the login address carried in the response information to the game client if a response information of the cross-server request is received, so that the game client generates a login request according to the login address and jumps the game page to the login page of the cross-server server.

[0054] In another embodiment, the apparatus further comprises:

[0055] a judgment unit, configured to judge whether the game client has logged in on the cross-server server in response to a trigger instruction of a second login request from the game client, after sending the cross-server request to the cross-server server in response to a trigger instruction of a cross-server request from the game client, wherein the second login request is used to log in to a target game server;

[0056] The rejecting unit is used to reject the second login request of the game client if so.

[0057] According to a fifth aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.

[0058] According to a sixth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0059] By means of the above technical scheme, the present application provides a cross-server method, device and equipment for online games. Compared with the current existing method of obtaining the game character data required for cross-server from the source game server to perform cross-server online games, the present application obtains the request access information for the target game server to establish a connection with the cross-server server during the game operation, and uses the game data recorded by each server to create a shared database, in which a database table formed by the game server identifier is stored. The game server identifier is associated with the game character data of the game server. By reading the target server identifier in the database table, the game character data of the target game server associated with the target game server identifier is obtained, and the game operation of the game client is executed according to the game character data corresponding to the target game server, so that the cross-server process does not need to obtain the game character data required for cross-server from the source game server, which can simplify the cross-server function and reduce the difficulty of coupling the game business logic with the business logic of the cross-server server.

[0060] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0062] Figure 1 A schematic diagram showing a flow chart of a cross-server method for an online game provided in an embodiment of the present application is shown;

[0063] Figure 2 A schematic diagram showing a flow chart of another cross-server method for an online game provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram showing a flow chart of another cross-server method for an online game provided in an embodiment of the present application;

[0065] Figure 4 A schematic diagram showing a framework of a game server group provided in an embodiment of the present application

[0066] Figure 5a A schematic diagram showing a process of generating a pickaxe front trajectory curve at a current mining point provided by an embodiment of the present application is shown;

[0067] Figure 5b A schematic diagram showing a process of generating a pickaxe front trajectory curve at a current mining point provided by an embodiment of the present application;

[0068] Figure 6 A schematic diagram of the structure of a cross-server device for an online game provided in an embodiment of the present application is shown;

[0069] Figure 7 A schematic diagram showing the structure of another cross-server device for an online game provided in an embodiment of the present application is shown;

[0070] Figure 8 A schematic diagram showing the structure of another cross-server device for an online game provided in an embodiment of the present application is shown;

[0071] Fig. 9 A schematic diagram showing the structure of another cross-server device for an online game provided in an embodiment of the present application is shown;

[0072] Fig.10 A schematic diagram of the device structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0073] Now the content of the present invention will be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the content of the present invention, rather than implying any limitation on the scope of the present invention.

[0074] As used herein, the term "including" and variations thereof are to be interpreted as open-ended terms meaning "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment." The term "another embodiment" is to be interpreted as "at least one other embodiment."

[0075] Normally, during the cross-server process of online games, after the game client logs in to the cross-server server, since each server has its own database, the cross-server process needs to obtain the game character data through the source game server when accessing the game character data. Taking the cross-server game login scenario as an example, after the cross-server server agrees to the cross-server request, all data access logic needs to be written separately, and the game character data required for the cross-server is obtained from the source game server, which makes the cross-server functions complicated and the logic of the new functions is difficult to couple to the business logic of the cross-server server.

[0076] In order to solve the above problems, this embodiment provides a cross-server method for online games, such as Figure 1 As shown, the method is applied to a cross-server server and includes the following steps:

[0077] 101. In response to a trigger instruction of a first login request of a game client, access request information for establishing a connection between a target game server and a cross-server server during game operation is obtained.

[0078] Usually, a game client corresponds to a game server, and the game server can connect to multiple game clients. In the network game framework, the target game server can be any game server. Each game client can obtain information about the game world through the game server. Correspondingly, the game server can store the player information of the game client, such as character level, equipment, etc. These information are provided by the game server, and the game client is only used to display this information. The logic of the entire game is also uniformly processed by the game server, and then the processing results are sent to the game client. In actual applications, due to CPU and bandwidth limitations, it is necessary to consider placing players in batches in different dimensions so that each game server can connect to game clients of a specific group of people, such as game clients of users in the same region and game clients of users at the same level. This makes it impossible for players connected to different game servers to interact with each other. As the number of game players continues to increase, cross-server gameplay as a game interaction channel can provide players with a better communication platform. Player clients can log in to the cross-server server after the cross-server request is allowed, so as to interact with players on other game servers on the cross-server server, such as game communication, game competition, game ranking, etc.

[0079] Among them, the first login request is used to request to log in to the cross-service server. In specific cross-service application scenarios, if there is a game character in the game client that needs to cross-server, the cross-service request can be sent to the cross-service server through the target game server connected to it. The cross-service server can decide which target game servers' cross-service requests to receive. After the cross-service server agrees to the cross-service request, the target game server informs the game character in the game client to exit from the target game server and log in to the cross-service server, and then obtains the request access information for establishing a connection between the target game server and the cross-service server during the game operation. The request access information is equivalent to the communication information formed by the target game server forwarding the cross-service request of the game client to the cross-service server, which may specifically include the game character identifier, the target game server identifier, etc.

[0080] The executor of this embodiment may be a cross-server device or equipment of an online game, which may be configured in a cross-server server. On the one hand, the cross-server server may establish a communication connection with the game server to verify and process the cross-server request of the game client, thereby ensuring that the game client connected to the cross-server server has login authority. On the other hand, the cross-server server may access the game client with login authority, and store and access game character data from a shared database during the game, thereby eliminating the need to store and access data from the database corresponding to the target game server during the cross-server process, thereby saving resource space occupied by the target game server.

[0081] 102. Create a shared database using the game data recorded by each game server.

[0082] Among them, the shared server stores a database table formed by the game server identification. The game server identification is associated with the game server's game character data, such as costumes, props, pets, skills, etc., and the game data needs to be transmitted between game servers during the game. For the scenario in which the game client logs in to the target game server, the shared database will provide the target game server with the game client's game character data. For the scenario in which the game client logs in to a cross-server server, the shared database will not provide the game client's game character data to the game server, but directly provide the game client's game character data to the cross-server server, so that the game client can quickly perform game operations on the cross-server server, while reducing the number of interactions between cross-server servers and simplifying the functional logic of the cross-server server.

[0083] 103. Obtain game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table.

[0084] It is understandable that during the game process, each game server and cross-server server will continuously generate new game data during use. The data structure of the shared database ensures the uniqueness of the game data in each game server. The storage specification can be formed through the database table to form an association relationship between the game server identifier and the game character data of the game server, thereby avoiding the mutual coverage of game data between each game server. Here, the attribute identifier of the game can be used to define the data structure of the key-value pair. The data structure of the key-value pair uses the attribute identifier of the game data as the key (key) and the corresponding data on the attribute identifier as the value (value), thereby facilitating the use of the attribute identifier of the game data to obtain the game data corresponding to the corresponding game server from the shared database.

[0085] 104. Execute the game operation of the game client according to the game character data corresponding to the target game server.

[0086] Among them, the game operations of the game client may include game play control, game character control, and game process control, etc. Since all game servers share a database, that is, all game data is stored in the shared database, the client's game operations form the storage and access of game data through the shared database, and there is no need to transmit the same data to each other among multiple game servers, so as to solve the problem of cumbersome logic of cross-server and merging functions during the game.

[0087] The cross-server method for online games provided in the embodiments of the present application is compared with the current existing method of obtaining the game character data required for cross-server operation from the source game server to perform cross-server operation for online games. The present application obtains the request access information for establishing a connection between the target game server and the cross-server server during the game operation, and uses the game data recorded by each server to create a shared database, wherein the shared database stores a database table formed by the game server identifier, and the game server identifier is associated with the game character data of the game server. By reading the target server identifier in the database table, the game character data of the target game server associated with the target game server identifier is obtained, and the game operation of the game client is executed according to the game character data corresponding to the target game server, so that the cross-server process does not need to obtain the game character data required for cross-server operation from the source game server, which can simplify the cross-server function and reduce the difficulty of coupling the game business logic with the business logic of the cross-server server.

[0088] Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, this embodiment provides another cross-server method for online games, such as Figure 2 As shown, the method includes:

[0089] 201. In response to a trigger instruction of a first login request of a game client, access request information for establishing a connection between a target game server and a cross-server server during game operation is obtained.

[0090] It is understandable that after cross-server play is enabled, a large number of game servers will establish connections with the cross-server server. In order to facilitate access control of the game servers, a central server can be set up as an intermediate server to determine whether the game server has access authority based on the game character information of the game server. If it has access authority, it means that the game character of the target game server has cross-server qualifications, and the cross-server server will be connected to the target game server with access authority, and the target game server will notify its corresponding game client to log in across servers.

[0091] 202. Create a shared database using the game data recorded by each game server.

[0092] 203. Determine an attribute identifier of a game character mapped by the target game server by reading the target game server identifier in the database table.

[0093] 204. Using the attribute identifier of the target game server mapping game character, obtain the game character data of the target game server associated with the target game server identifier.

[0094] Among them, the attribute identification of the game character at least includes the server area identification where the game character is located and the self-increment identification of the game character. The server area identification can be expressed as the identification of the game server for players in a specific area or players of a specific level, such as the East China Division, the Northeast Division, etc. Since all game servers share a database, the use of a shared database may bring two problems. On the one hand, it is necessary to ensure the uniqueness of the game data recorded in the shared database. If the game data is not unique, the game servers in the region may cover each other. On the other hand, in the actual game operation and maintenance process, there are also maintenance requirements for a single game server. For example, the clearing and rolling back of a single game server, or the merging of servers, etc., requires finding the corresponding game server for processing. In response to the above two problems, the database table of the embodiment of the present invention defines a key value format formed by different attribute identifications of game characters. The key value format mainly has the following two specifications: ID and Key.

[0095] Regarding the ID specification, the attribute identification of the game character at least includes the service area identification of the game character and the self-increasing identification of the game character. It can be specifically defined as area ID + self-increasing ID. For example, the character ID is 64 bits, so the lower 14 bits store the area ID where the current game character is located, and the upper 50 bits are the self-increasing ID of the area. This ensures that the game data of each game server in the shared database is unique. At the same time, the service area where the game data is located can also be calculated based on the ID, which brings convenience to subsequent game debugging.

[0096] Regarding the Key specification, the key value format at least includes the service area identifier of the game character, the game character table name and the game character identifier. The number of bits of the game character identifier stores the service area identifier of the game character and the self-increment identifier of the game character. All Keys are defined using strings in the format of [area ID]: [table name]: [Key ID]. For example, the character backpack has a character ID of 262521833. The area where the game character is located is the lower 14 bits. By ANDing with 0x3FFF, it can be calculated to be 1001. The backpack table name is inventory, so the backpack's Key is defined as: 1001:inventor:262521833.

[0097] 205. Execute the game operation of the game client according to the game character data corresponding to the target game server.

[0098] 206. In response to the trigger instruction of the cross-server request of the target game server, a list of game server identifiers that are allowed to access the cross-server server is obtained by using a mapping relationship between pre-configured game servers and cross-server servers.

[0099] 207. Establish a cross-server connection between the target game server and the cross-server server according to the list of game server identifiers allowed to access the cross-server server.

[0100] Specifically, the target game server identifier carried by the cross-server request can be obtained to determine whether the target game server identifier is in the game server identifier list. If so, it means that the game character of the game client is allowed to access the cross-server server, and further establish a cross-server connection between the target game server and the cross-server server.

[0101] The cross-server process of the network game in the embodiment of the present invention mainly involves devices including a game client, a game server and a cross-server server, wherein the game server and the cross-server server are essentially the same server. The game server as a source game server will establish a connection with its own cross-server server. Logically speaking, the main differences between the cross-server server and the game server are as follows: on the one hand, the cross-server server can actually provide a server where game characters are concentrated for each access to the game server, and new game characters are not allowed to be created in the cross-server server; on the other hand, the cross-server server can allow game characters on the target game server to log in, while the game server only allows game characters on its own server to log in; on the other hand, the game characters can only log in to one of the game servers or the cross-server server.

[0102] In order to solve the above problems, a game server group is provided. The framework of the Giallo game server group is as follows: Figure 4 As shown, first, the cross-server server and the game server in the game server group are marked in advance to distinguish different server functions. If it is a game server, a game character can be created. If it is a cross-server server, functions such as creating game characters will be prohibited; secondly, a configuration table of the game server and the cross-server is established, and the mapping relationship between the game server and the cross-server is configured. According to the mapping relationship, a TCP connection is established with its own cross-server server on the game server, and the cross-server server decides which game servers can establish a connection with itself. Then, when the game character of the client needs to cross-server, the game server can send an access request to the cross-server server, and record the game character that currently needs to cross-server in the cross-server server. Only the game client with the recorded game character is allowed to log in on the cross-server server; finally, when any game character logs in to the game server, it is necessary to first determine whether the game character has logged in on the cross-server server. If it has logged in on the cross-server server, it is not allowed to log in on other game servers, so as to prevent the game character from logging in on the game server and the cross-server server at the same time.

[0103] It is understandable that after the game server has been running for a period of time, if the number of players connected to the game server is too small, the game servers with fewer connected game player clients will be merged so that the game servers after the merger can connect to more players and improve the player's gaming experience. In the prior art, if there is a need for merging game servers, since each game server is a separate database, the database of the source game server needs to be merged into the database of the target game server through the merging tool during the merging. However, the merging tool is troublesome to maintain, and the business is tightly coupled with the merging tool. Every time a new business is developed, if it involves database changes, the merging tool needs to be maintained. In addition, the merging process requires a separate merging tool to be written so that all data of a single game server is copied from the merged game server to the target game server. As the project operation and maintenance time becomes longer and longer, the data of a single game server will become longer and longer, and the merging time will also become longer and longer, affecting the efficiency of the merging operation. In the embodiment of the present application, the shared database is used in the merging process. First, it is transparent to the players. That is to say, before and after the merging, whether it is the merging player or the target player of the merging, the game experience is basically the same. Secondly, there is no data copying in the merging process.

[0104] Specifically, in the process of merging game servers, in response to the trigger instruction of the target game server merge request, the pre-set server merge configuration table is used to determine the service area identifier where the game character is mapped to the game server to be merged, and according to the service area identifier, the interface information for connecting to the target game server in the shared database is modified to the interface information for the game server to be merged. For example, the server merge configuration table can be configured using json. For the configuration data {"combine_list":[{"target_zoneid":1001,"combined_zoneids":

[1002] }]}, it means that the area 1002 where the game server is located is merged into the game server area 1001, and the game server IP and port corresponding to the area 1002 in the game server list provided to the game client are directly changed to the game server IP and port corresponding to the area 1001. That is to say, when a player logs in to the game server in area 1002, he is actually logging in to the game server in area 1001. At this time, what the game server needs to process is that according to the server merge configuration table, the game server in area 1001 allows the player in area 1002 to log in.

[0105] It is understandable that since the game client can access the character data of the players on the game server to be merged from the shared data, there is no need to connect to the character data of the players on the target game server. Further, based on the service area identifier, the game orange data corresponding to the target game server is queried and deleted from the shared database, so that there is no data copy in the merging process, and only the deletion of some regional game servers needs to be processed. For example, for the ranking list of regional game servers, the character data of the players on the regional game server can be deleted by querying the key corresponding to the regional game server, and then directly deleted through the tool, which saves the data processing time of the merging process and improves the merging efficiency of the game process.

[0106] This embodiment provides a cross-server method for an online game, as shown in FIG5 , the method is applied to a target game server, and includes the following steps:

[0107] 301. In response to a trigger instruction of a cross-server request from a game client, a cross-server request is sent to a cross-server server.

[0108] The game server identifier list records the game server identifiers that are allowed to create characters on the cross-server server. Since the game character can only log in on one game server, the game client can only select one from the target game server and the cross-server server to log in. In order to ensure the uniqueness of the game character logged in by the game server, in the process of any game character requesting to log in to the game server, in response to the triggering instruction of the second login request of the game client, it can be determined whether the game client has logged in on the cross-server server. The second login request is used to log in to the target game server. If so, it means that the game client has logged in on the cross-server server, and the second login request of the game client is rejected. Otherwise, the game client is allowed to log in on the game server.

[0109] Specifically, the game client interface will determine whether the player has cross-server login permission based on the player's identity identifier. If the player has cross-server permission, the login window of the cross-server game server will be displayed. The identity identifier can be a player ID, player character ID, etc. As the player's unique identifier, it can prevent the game character from logging in to the game server and the cross-server server at the same time.

[0110] The executor of this embodiment may be a cross-server device or equipment of an online game, which may be configured in a game server. On the one hand, the game server may establish a communication connection with a cross-server server to forward and process cross-server requests of game clients, thereby ensuring that game clients connected to the cross-server server have login permissions. On the other hand, the game server may access game clients with login permissions and store and retrieve game character data from a shared database during the game.

[0111] 302. If a response message to the cross-server request is received, the login address carried in the response message will be pushed to the game client.

[0112] If response information to the cross-server request is received, it means that the cross-server server allows the game character to log in to the cross-server server. The response information may include the login information of the cross-server server, such as the login address, login method, etc. The game server can further inform the game client to log out of the game server and log in to the cross-server server, and push the login address carried in the response information to the game client. The login address is the login address of the cross-server server.

[0113] In the prior art, each game server has a corresponding separate database. Specifically, in the cross-server process of online games, the interaction process between the game client, the cross-server server, and the game server is as follows: Figure 5a As shown, after the game client initiates a cross-server request to the game server, the game server communicates with the central server set up by the cross-server server to determine whether the cross-server login of the game client is allowed. If the cross-server request is approved, the game server informs the game client to log out and log in to the central server. After the game client logs in to the central server, the central server obtains the game data associated with the game client from the database corresponding to the game server, such as player data, public data, etc., and returns it to the game client for display. During the entire cross-server process, the cross-server server will access the game characters of multiple game clients. During the game process, it is necessary to obtain game data from the databases corresponding to multiple game servers, and while storing the game data, it is also necessary to save the data to the databases corresponding to the corresponding game servers at regular intervals, so that the cross-server server needs to write functional logic separately each time, resulting in cumbersome cross-server processes. In this application, all game servers and cross-server servers use a shared database. Specifically, in the cross-server process of online games, the interaction process between game clients, cross-server servers, and game servers is as follows: Figure 5bAs shown, after the game client initiates a cross-server request to the game server, the game server communicates with the central server set by the cross-server server to determine whether the cross-server login of the game client is allowed. If the cross-server request is approved, the game server informs the game client to log out and log in to the central server, and saves the game character in the shared database. After the game client logs in to the central server, the central server obtains the game data associated with the game client from the shared server, such as player data, public data, etc., and returns it to the game client for display. During the entire cross-server process, the cross-server server will access the game characters of multiple game clients. All game character data required during the game can obtain the corresponding data from the shared database, and then the cross-server server does not need to interact with the databases corresponding to multiple game servers, but can obtain the game character data corresponding to all game servers through the shared server, thereby simplifying the functional logic of the cross-server server and improving the cross-server efficiency of online games.

[0114] Further, as Figure 1 and Figure 2 The specific implementation of the method, the embodiment of the present application provides a cross-server device for online games, such as Figure 6 As shown, the device includes: a first acquisition unit 41, a creation unit 42, a second acquisition unit 43, and an execution unit 44.

[0115] The first acquisition unit 41 may be configured to respond to a trigger instruction of a first login request from a game client and acquire access request information for establishing a connection between a target game server and a cross-server server during game operation, wherein the first login request is used to request logging into a cross-server server, and the access request information carries an identifier of a target game server;

[0116] The creation unit 42 may be used to create a shared database using the game data recorded by each game server, wherein the shared server stores a database table formed by game server identifiers, wherein the game server identifiers are associated with game character data of the game servers;

[0117] The second acquisition unit 43 may be configured to acquire the game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table;

[0118] The execution unit 44 may be configured to execute the game operation of the game client according to the game character data corresponding to the target game server.

[0119] The cross-server device of the network game provided by the embodiment of the present invention obtains the request access information for establishing a connection between the target game server and the cross-server server during the game running process, and uses the game data recorded by each server to create a shared database, wherein the shared database stores a database table formed by the game server identifier, and the game server identifier is associated with the game character data of the game server. By reading the target server identifier in the database table, the game character data of the target game server associated with the target game server identifier is obtained, and the game operation of the game client is executed according to the game character data corresponding to the target game server, so that the cross-server process does not need to obtain the game character data required for the cross-server from the source game server, which can simplify the cross-server function and reduce the difficulty of coupling the game business logic with the business logic of the cross-server server.

[0120] In specific application scenarios, such as Figure 7 As shown, the database table defines a key value format formed by different attribute identifiers of game characters, and the second acquisition unit 43 includes:

[0121] The determination module 431 may be used to determine the attribute identifier of the game character mapped by the target game server by reading the target game server identifier in the database table;

[0122] The acquisition module 432 may be used to acquire the game character data of the target game server associated with the target game server identifier by using the attribute identifier of the game character mapped by the target game server.

[0123] In a specific application scenario, the attribute identifier of the game character includes at least the service area identifier of the game character and the self-increment identifier of the game character, the key value format includes at least the service area identifier of the game character, the game character table name and the game character identifier, and the number of bits of the game character identifier stores the service area identifier of the game character and the self-increment identifier of the game character.

[0124] In specific application scenarios, such as Figure 7 As shown, the device also includes:

[0125] The determination unit 45 may be configured to determine the service area identifier of the game character mapped by the game server to be merged using a preset server merging configuration table in response to a trigger instruction of a target game server merging request after executing the game operation of the game client according to the game character data corresponding to the target game server;

[0126] The merging unit 46 may be configured to modify the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier.

[0127] In specific application scenarios, such as Figure 7 As shown, the device also includes:

[0128] The deleting unit 47 can be used to query and delete the game character data corresponding to the target game server from the shared database according to the service area identifier after modifying the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier.

[0129] In specific application scenarios, such as Figure 7 As shown, the device also includes:

[0130] The third acquisition unit 48 may be configured to, before responding to the trigger instruction of the first login request of the game client and obtaining the request access information for establishing a connection between the target game server and the cross-server server during the game running process, respond to the trigger instruction of the cross-server request of the target game server, and obtain the game server identification list that is allowed to access the cross-server server by using the mapping relationship between the pre-configured game server and the cross-server, wherein the game server identification list records the game server identification that is allowed to create a character on the cross-server server;

[0131] The establishing unit 49 may be configured to establish a cross-server connection between the target game server and the cross-server server according to the game server identification list allowed to access the cross-server server.

[0132] In specific application scenarios, such as Figure 7 As shown, the establishing unit 49 includes:

[0133] The determination module 491 may be used to obtain the target game server identifier carried by the cross-server request, and determine whether the target game server identifier is in the game server identifier list;

[0134] Establishing module 492 may be used to establish a cross-server connection between the target game server and the cross-server server if so.

[0135] It should be noted that for other corresponding descriptions of the functional units involved in the cross-server device for an online game provided in this embodiment, reference can be made to Figure 1-Figure 2 The corresponding description in will not be repeated here.

[0136] Further, as Figure 3 The specific implementation of the method, the embodiment of the present application provides a cross-server device for online games, such as Figure 8 As shown, the device includes: a sending unit 51 and a pushing unit 52.

[0137] The sending unit 51 may be configured to send a cross-server request to the cross-server server in response to a trigger instruction of the cross-server request of the game client;

[0138] The push unit 52 can be used to push the login address carried in the response information to the game client if it receives the response information of the cross-server request, so that the game client generates a login request according to the login address and jumps the game page to the login page of the cross-server server.

[0139] In specific application scenarios, such as Fig. 9 As shown, the device also includes:

[0140] The judgment unit 53 may be configured to judge whether the game client has logged in on the cross-server server in response to a trigger instruction of a second login request from the game client after sending the cross-server request to the cross-server server in response to a trigger instruction of a cross-server request from the game client, wherein the second login request is used to log in to a target game server;

[0141] The rejecting unit 54 may be configured to reject the second login request of the game client if yes.

[0142] It should be noted that for other corresponding descriptions of the functional units involved in the cross-server device for an online game provided in this embodiment, reference can be made to Figure 3 The corresponding description in will not be repeated here.

[0143] Based on the above Figure 1-Figure 2 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1-Figure 2 Based on the above, Figure 3 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 3 The cross-server method of the online game is shown.

[0144] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0145] Based on the above Figure 1-Figure 3 The method shown in FIG5- Fig. 9In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a physical device of a cross-server server and a target game server, which can be a computer, a server, or other network devices, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1-Figure 3 The cross-server method of the online game is shown.

[0146] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0147] In an exemplary embodiment, see Fig.10 The physical device includes a communication bus, a processor, a memory and a communication interface, and may also include an input / output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the painting mounting method in the above embodiment.

[0148] Those skilled in the art will appreciate that the cross-server physical device structure of an online game provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0149] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for the store search information processing, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the physical device for information processing.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or by hardware. By applying the technical solution of the present application, compared with the current existing methods, the shared database in the present application stores a database table formed by the game server identifier, and the game server identifier is associated with the game character data of the game server. By reading the target server identifier in the database table, the game character data of the target game server associated with the target game server identifier is obtained, and the game operation of the game client is executed according to the game character data corresponding to the target game server, so that the cross-server process does not need to obtain the game character data required for cross-server from the source game server, which can simplify the cross-server function and reduce the coupling difficulty of the game business logic and the business logic of the cross-server server.

[0151] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0152] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A cross-server method for online games. It is characterized in that include: In response to a trigger instruction of a first login request from a game client, obtaining access request information for establishing a connection between a target game server and a cross-server server during game operation, wherein the first login request is used to request to log in to a cross-server server, and the access request information carries an identifier of a target game server, and is communication information formed by the target game server forwarding the cross-server request of the game client to the cross-server server; Using the game data recorded by each game server, a shared database is created, wherein the shared server stores a database table formed by game server identifiers, wherein the game server identifiers are associated with game character data of the game servers; Obtaining game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table; Executing the game operation of the game client according to the game character data corresponding to the target game server; In response to a trigger instruction of a target game server merge request, using a pre-set server merge configuration table, determine a service area identifier where a game character is mapped to the game server to be merged; According to the service area identifier, the interface information for connecting to the target game server in the shared database is modified to the interface information for connecting to the game server to be merged.

2. The method according to claim 1, It is characterized in that The database table defines a key value format formed by different attribute identifiers of the game character, and the step of obtaining the game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table specifically includes: Determine the attribute identifier of the game character mapped by the target game server by reading the target game server identifier in the database table; The target game server maps the attribute identifier of the game character to obtain the game character data of the target game server associated with the target game server identifier.

3. The method according to claim 2, It is characterized in that The attribute identifier of the game character includes at least the service area identifier of the game character and the self-increment identifier of the game character, the key value format includes at least the service area identifier of the game character, the game character table name and the game character identifier, and the number of bits of the game character identifier stores the service area identifier of the game character and the self-increment identifier of the game character.

4. The method according to claim 1, It is characterized in that After modifying the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier, the method further includes: According to the service area identifier, the game character data corresponding to the target game server is queried and deleted from the shared database.

5. The method according to any one of claims 1 to 3, It is characterized in that Before obtaining access information of a request for establishing a connection between a target game server and a cross-server server during game operation in response to a trigger instruction of a first login request from a game client, the method further includes: In response to a trigger instruction of a cross-server request of a target game server, a mapping relationship between a pre-configured game server and a cross-server is used to obtain a list of game server identifiers that are allowed to access the cross-server, wherein the game server identifier list records game server identifiers that are allowed to create characters on the cross-server; According to the game server identification list allowed to access the cross-server server, a cross-server connection is established between the target game server and the cross-server server.

6. The method according to claim 5, It is characterized in that The establishing a cross-server connection between the target game server and the cross-server server according to the game server identification list allowed to access the cross-server server specifically includes: Obtaining the target game server identifier carried by the cross-server request, and determining whether the target game server identifier is in the game server identifier list; If so, a cross-server connection is established between the target game server and the cross-server server.

7. A cross-server device for online games, It is characterized in that include: A first acquisition unit is used to respond to a trigger instruction of a first login request from a game client and acquire access information of a request for establishing a connection between a target game server and a cross-server server during game operation, wherein the first login request is used to request to log in to the cross-server server; A creation unit, used to create a shared database using the game data recorded by each game server, wherein the shared server stores a database table formed by game server identifiers, wherein the game server identifiers are associated with game character data of the game servers; A second acquisition unit is used to acquire the game character data of the target game server associated with the target game server identifier by reading the target game server identifier in the database table; An execution unit, configured to execute a game operation of the game client according to the game character data corresponding to the target game server; A determination unit, configured to respond to a trigger instruction of a target game server merge request and determine a service area identifier where a game character is mapped to the game server to be merged by using a preset server merge configuration table; The merging unit is used to modify the interface information of the target game server in the shared database to the interface information of the game server to be merged according to the service area identifier.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the cross-server method for the online game described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the cross-server method for an online game described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data integration method and device

    CN109376157A

  • Cross-server system, cross-server method and server

    CN109510872A