CN111282262B - Game server communication method and device - Google Patents

Game server communication method and device Download PDF

Info

Publication number
CN111282262B
CN111282262B CN202010031248.XA CN202010031248A CN111282262B CN 111282262 B CN111282262 B CN 111282262B CN 202010031248 A CN202010031248 A CN 202010031248A CN 111282262 B CN111282262 B CN 111282262B
Authority
CN
China
Prior art keywords
server
client
target
game
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010031248.XA
Other languages
Chinese (zh)
Other versions
CN111282262A (en
Inventor
王雨航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010031248.XA priority Critical patent/CN111282262B/en
Publication of CN111282262A publication Critical patent/CN111282262A/en
Application granted granted Critical
Publication of CN111282262B publication Critical patent/CN111282262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1014Server selection for load balancing based on the content of a request
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements

Abstract

The embodiment of the invention provides a method and a device for communication of game servers.A first server communicated with a client receives a cross-server login request which is sent by the client and comprises a service identifier, and can send the cross-server login request to a third server, so that the third server can distribute a target second server for the client according to the cross-server login request and generate corresponding distribution information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. The method can enable users of different regions, languages, platforms or the like to realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is used as an intermediate server and is only responsible for distributing the second server according to the cross-server login request of the user, so that the load of the game server is reduced.

Description

Game server communication method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for game server communication.
Background
In the field of games, server data intercommunication may be required due to the loss of game users and the like. For example, if a game user experiences more churn, in order to save service resources, user data in different server services may be merged into one server.
In the prior art, when server intercommunication is implemented, data of servers with the same service is usually merged, and the merged server can provide original service for users.
In the server data intercommunication scheme in the prior art, the data volume of the merging server is too large, and because the possible span of the server, such as the region, the operator or the channel, is large, the server data intercommunication scheme in the prior art cannot realize the data intercommunication across the servers, so that the development of games is restricted.
Disclosure of Invention
The embodiment of the invention provides a game server communication method and device, which can solve the technical problems that the server data intercommunication in the prior art can not provide richer services for game players and is greatly restricted by external factors.
In a first aspect, an embodiment of the present invention provides a method for game server communication, where the method is applied to a first server of a game service system, and the game service system further includes: at least one second server and at least one third server, the method comprising:
receiving a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
sending the cross-server login request to the third server, so as to distribute a target second server for the client through the third server and generate corresponding distribution information;
receiving the distribution information sent by the third server;
sending the allocation information to the client to instruct the client to communicate with the target second server.
Optionally, the allocating, by the third server, a target second server to the client and generating corresponding allocation information includes: and determining a target second server configured with the service corresponding to the service identifier in the at least one second server through the third server, and generating the distribution information according to the number of the target second server.
Optionally, the method further includes:
determining, by the third server, a target second server configured with a service corresponding to the service identifier in the at least one second server, including:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server through the third server.
Optionally, after the sending the cross-server login request to the third server, the method further includes: acquiring user information of the client;
the allocating, by the third server, a target second server to the client includes:
and distributing the target second server to the client by the third server according to the service identifier and the user information.
Optionally, the cross-server login request further includes: user information of the client;
the allocating, by the third server, a target second server to the client includes:
and distributing the target second server to the client by the third server according to the service identifier and the user information.
Optionally, the user information includes at least one of:
and the client corresponds to the attribute information of the user account, the operating system, the region and the language.
Optionally, different service resources are configured on the first server and the second server.
Optionally, after sending the allocation information to the client, the method further includes:
and disconnecting the communication connection with the client.
A second aspect of an embodiment of the present invention provides a method for game server communication, which is applied to a third server of a game service system, where the game service system further includes: a first server and at least one second server, the method comprising:
receiving a cross-server login request sent by the first server, wherein the cross-server login request comprises a service identifier;
allocating a target second server for the client and generating corresponding allocation information;
sending the allocation information to the first server, wherein the allocation information is used for indicating the client to communicate with the target second server.
The allocating a target second server to the client and generating corresponding allocation information includes:
and distributing a target second server for the client according to the service identifier, and generating corresponding distribution information.
Optionally, the cross-server login request further includes: user information of the client;
the allocating a target second server to the client comprises:
and distributing a target second server to the client according to the service identifier and the user information.
Optionally, the method further includes:
acquiring the load state of the at least one second server;
the allocating a target second server to the client according to the service identifier includes:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
A third aspect of an embodiment of the present invention provides a method for game server communication, which is applied to a game service system, where the game service system includes: the system comprises a first server, at least one second server and at least one third server; the method comprises the following steps:
the first server receives a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
the first server sends the cross-server login request to the third server;
the third server distributes a target second server for the client and generates corresponding distribution information;
the third server sends the allocation information to the first server;
the first server receives the distribution information sent by the third server;
the first server sends the allocation information to the client to instruct the client to communicate with the target second server.
A fourth aspect of the embodiments of the present invention provides a game server communication apparatus, which is applied to a first server of a game service system, where the game service system further includes: at least one second server and at least one third server, the apparatus comprising:
a first receiving module, configured to receive a cross-server login request sent by a client that communicates with the first server, where the cross-server login request at least includes a service identifier;
the first sending module is used for sending the cross-server login request to the third server so as to distribute a target second server for the client through the third server and generate corresponding distribution information;
a second receiving module, configured to receive the allocation information sent by the third server;
and the second sending module is used for sending the distribution information to the client so as to indicate the client to communicate with the target second server.
Optionally, the first sending module is specifically configured to: and determining a target second server configured with the service corresponding to the service identifier in the at least one second server through the third server, and generating the distribution information according to the number of the target second server.
Optionally, the determining, by the third server, a target second server configured with a service corresponding to the service identifier in the at least one second server includes: and the third server determines a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
Optionally, the target second server is allocated to the client by the third server according to the service identifier and the user information.
Optionally, the cross-server login request further includes: user information of the client; and the target second server allocates a target second server to the client for the third server according to the service identifier and the user information.
Optionally, the user information includes at least one of:
and the client corresponds to the attribute information of the user account, the operating system, the region and the language.
Optionally, different service resources are configured on the first server and the second server.
Optionally, the method further includes:
and the disconnection module is used for disconnecting the communication connection with the client.
A fifth aspect of an embodiment of the present invention provides a game server communication device, which is applied to a third server of a game service system, where the game service system further includes: a first server and at least one second server, the apparatus comprising:
the receiving module is used for receiving a cross-server login request sent by the first server, wherein the cross-server login request comprises a service identifier;
the distribution module is used for distributing a target second server for the client and generating corresponding distribution information;
a sending module, configured to send the allocation information to the first server, where the allocation information is used to instruct the client to communicate with the target second server.
Optionally, the allocation module is specifically configured to:
and distributing a target second server for the client according to the service identifier, and generating corresponding distribution information.
Optionally, the cross-server login request further includes: user information of the client;
the allocation module is specifically further configured to:
and distributing a target second server to the client according to the service identifier and the user information.
Optionally, the method further includes:
an obtaining module, configured to obtain a load status of the at least one second server;
the allocation module is specifically further configured to:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
A sixth aspect of an embodiment of the present invention provides a system for game server communication, where the game service system includes: a first server, at least one second server, and at least one third server, wherein,
the first server is used for receiving a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
the first server is further used for sending the cross-server login request to the third server;
the third server is used for distributing a target second server for the client and generating corresponding distribution information;
the third server is further configured to send the allocation information to the first server;
the first server is further used for receiving the distribution information sent by the third server;
the first server is further configured to send the allocation information to the client to instruct the client to communicate with the target second server.
A seventh aspect of the embodiments of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of the preceding first aspects.
An eighth aspect of the embodiments of the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of the preceding second aspects.
A ninth aspect of embodiments of the present invention provides a computer-readable storage medium, which stores a computer program that, when executed, implements a method according to any one of the preceding first aspects.
A tenth aspect of embodiments of the present invention provides a computer-readable storage medium, storing a computer program which, when executed, implements a method according to any one of the preceding second aspects.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a method and a device for game server communication, which are applied to a game service system.A first server in communication with a client receives a cross-server login request which is sent by the client and comprises a service identifier, and can send the cross-server login request to a third server, so that the third server can distribute a target second server for the client according to the cross-server login request and generate corresponding distribution information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service can be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for users; when users in different regions, languages or platforms need to implement the service, the third server can allocate a target second server for implementing the service to the user only through the communication process, and then the user can implement the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
Drawings
FIG. 1 is a schematic diagram of a conventional server for providing services to game players
FIG. 2 is a flow chart illustrating a method for game server communication according to an embodiment of the present invention;
FIG. 3 is another flow chart of a method for game server communication according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a specific game application scenario provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of another specific game application scenario provided by an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an embodiment of a game server communication device according to the present invention;
fig. 7 is a schematic structural diagram of another game server communication device according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
It should be understood that the terms "first," "second," "third," "fourth," and the like (if any) in the description and claims, and in the foregoing drawings, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The words "if", as used herein, may be interpreted as "at ...when" or "when ...30, when" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrases "comprising one of ...does not exclude the presence of additional like elements in articles of commerce or systems including such elements.
Generally, because servers are limited by their own load, regional factors, operators or channels, and the like, most of multiplayer online games have multiple groups of servers simultaneously set up during online operation to meet different regional requirements, or increase the number of online players that can be accommodated simultaneously in the game, and the like, for example, as shown in fig. 1, a general server architecture diagram for providing services to game players is shown, where a game player may be a user playing a game based on a mobile terminal, a game host, or a PC terminal, but game players among the groups of servers cannot intercommunicate without any interaction, and game players on different server groups (or clusters) cannot intercommunicate to realize simultaneous games.
The game players on different server groups are difficult to intercommunicate to realize simultaneous game, often because data among different servers are not intercommunicated or technical difficulties are faced in realization. Specifically, for example, games are often restricted by territories, laws, copyrights, or the like, so that flexible communication is not possible between players logged in servers of different territories.
In the embodiment of the invention, all services of a game are usually distributed in the same server or a group of servers in the game, so that flexible communication cannot be realized among the servers as long as limited services exist in the game. Therefore, in the embodiment of the invention, the game is divided at a business level, the business which can realize the intercommunication of the multiple servers is extracted from the game, and the extracted business is deployed in the universal server, so that when the game player plays the game, the universal server can be used for providing corresponding services for the game players in different areas. For example, even if a plurality of game players are on different groups of servers across the country, the game players can share the same server for playing, and because the extracted service provides the same service for all the game players, the game players have no other limitation except for the service related to the original server, so that the extraction of the game service is beneficial to the design of the whole game system, the game system can provide the same service for users with different sources without distinguishing the sources of the game players, and the server expansion is facilitated.
Specifically, the embodiment of the invention provides a method and a device for game server communication, which are applied to a game service system, wherein a first server in communication with a client in the system receives a cross-server login request which is sent by the client and comprises a service identifier, and can send the cross-server login request to a third server, so that the third server can allocate a target second server to the client according to the cross-server login request and generate corresponding allocation information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service can be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for users; and when users in different regions, languages or platforms need to realize the service, the third server can allocate a target second server for realizing the service to the users only through the communication process, and then the users can realize the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for distributing the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely the first server) is reduced.
The service provided in the second server in the embodiment of the present invention may be a general service suitable for pull-out, which is not limited by regions, laws, or copyrights in the game. Accordingly, the service in the first server described in the embodiment of the present invention may be a limited, non-universal service, and a service that is not suitable for pull-away. For example, in the case of a battle game, the service in the first server may be a fee-related service such as a pay service (since the fee is often limited differently by an agent, etc.), and the service in the second server may be a battle service in the game, a chat service, etc. It can be understood that, in an actual application scenario, specific service contents of the service in the first server and the service in the second server may be set according to the actual application scenario, which is not specifically limited in this embodiment of the present invention.
The first server in the embodiment of the present invention may be a server that communicates with a client of a user, and for example, the user may perform operations such as login in the first server.
The third server in the embodiment of the present invention may be used to allocate an intermediate server of the target second server to the first server, and the third server may be a logic module, a hardware circuit, or the like to implement the function of the third server.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
As shown in fig. 2, fig. 2 is a schematic flowchart of a game server communication method according to an embodiment of the present invention. A first server applied to a game service system, the game service system further comprising: at least one second server(s), and at least one third server. The method specifically comprises the following steps:
step S101: and receiving a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier.
In the embodiment of the invention, a user can log in a first server through a client, and after the login is successful, a cross-server login request can be sent to the first server, wherein the cross-server login request at least comprises a service identifier. The service identifier corresponds to a service to be responded, the service corresponding to the service identifier may be set in the second server, and the service identifier may be used to indicate which type of second server the client will subsequently connect to or log in.
Step S102: and sending the cross-server login request to the third server so as to distribute a target second server for the client through the third server and generate corresponding distribution information.
In the embodiment of the present invention, the first server may forward the cross-server login request including the service identifier to the third server, and the third server may allocate, to the user, the target second server provided with the service corresponding to the service identifier according to the service identifier. The third server may generate allocation information for identifying the target second server, for example, the allocation information may include a server identifier of the target second server, and the like, so that the subsequent client may implement a service corresponding to the service identifier based on the service provided by the second server.
In an optional implementation manner, the third server determines, in the at least one second server, a target second server configured with a service corresponding to the service identifier, and generates the allocation information according to a number of the target second server.
In the embodiment of the present invention, the third server may match the service identifier with the identifiers of the services in the one or more second servers, further obtain the target second server configured with the service corresponding to the service identifier, and generate the distribution information according to the number of the target server.
In an optional implementation manner, the third server may further obtain a load status of the at least one target second server. The third server determining, in the at least one second server, a target second server configured with a service corresponding to the service identifier, including: and the third server determines a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
In this embodiment of the present invention, the load status may be embodied as an application resource status of the second server, for example, an idle status of a Central Processing Unit (CPU) configured on the second server, or a memory occupation ratio. In a specific implementation, there may be a plurality of second servers configured with the service corresponding to the service identifier, and therefore, the third server may select, as the target second server, a second server whose load state satisfies a preset condition, for example, a server in an idle state or a second server whose current memory proportion is lower than a preset threshold (which may be adaptively set according to an actual application scenario) may be selected as the target second server, so that the target second server may subsequently implement a better service.
In an optional implementation manner, the method further includes: acquiring user information of the client;
and the target second server is distributed to the client by the third server according to the service identifier and the user information.
In the embodiment of the invention, the user information of the client can be acquired by the first server, and the acquisition by the first server has higher security than the self-transmission by the client in consideration of data security. It is to be understood that, in practical applications, the cross-server login request may also be sent to the first server by the client, for example, the cross-server login request further includes: user information of the client; the embodiment of the present invention is not particularly limited thereto.
Optionally, the user information includes at least one of: and the client corresponds to the attribute information of the user account, the operating system, the region and the language.
Exemplarily, the user account attribute information corresponding to the client may include a nickname, a gender, a role type, an equipment prop, a decoration prop, and the like of the account of the user, the operating system or the platform may be an iOS system or an android system, and an App Store based on the iOS system, or a multiple game download platform based on a Google Play of the android system, and the like, the region may be obtained according to the location of the client, and the language may be a corresponding setting of the user in creating the account, and the embodiment of the present invention is not specifically limited thereto.
In the embodiment of the invention, the third server can select the adaptive target second server for the user according to the region where the client is located, the used language and the like, so that the target second server can provide better service for the user.
Step S103: and receiving the distribution information sent by the third server.
In the embodiment of the present invention, after determining the target second server, the third server sends, to the first server, allocation information including information of the target second server, where the information of the target second server may be, for example, address information, identification information, and the like of the target second server, so that a client connected to the first server may implement communication with the target second server through the allocation information.
Step S104: sending the allocation information to the client to instruct the client to communicate with the target second server.
In the embodiment of the present invention, the first server may forward the allocation information to the client, and the user may implement the service corresponding to the service identifier based on the communication with the target second server.
In this embodiment of the present invention, any existing communication form may be used for the communication form between the first server and the third server, the communication form between the first server and the client, and the communication form between the client and the second server, which is not specifically limited in this embodiment of the present invention.
Optionally, after the first server sends the allocation information to the client, because the client implements the corresponding service based on the target second server, the first server may disconnect the communication connection with the client, so that the communication resource of the first server may be saved.
Optionally, different service resources are configured on the first server and the second server. Exemplarily, a first server is configured with a service resource corresponding to a first service, and a second server is configured with a service resource corresponding to a second service, and the method according to the embodiment of the present invention further includes: the first server receives a message sent by the client, wherein the message comprises the user information and an identifier of a first service; the first server is in communication with the client for implementing the first service.
In the embodiment of the present invention, the first service is a service that is not extracted from a game, and differences may exist in the first services in different regions, so that a service resource of the first service is set in the first server, and when a client requests to implement the first service, a message including user information and an identifier of the first service may be sent to the first server, and then the client may implement the first service based on communication with the first server.
In summary, the embodiments of the present invention provide a method and an apparatus for game server communication, which are applied to a game service system, in which a first server in communication with a client receives a cross-server login request including a service identifier sent by the client, and can send the cross-server login request to a third server, and then the third server can allocate a target second server to the client according to the cross-server login request, and generate corresponding allocation information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service can be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for users; and when users in different regions, languages or platforms need to realize the service, the third server can allocate a target second server for realizing the service to the users only through the communication process, and then the users can realize the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
Fig. 3 is another flowchart of a method for game server communication according to an embodiment of the present invention. A third server applied to a game service system, the game service system further comprising: as shown in fig. 3, the method for communication between a first server and at least one second server provided by the present invention may specifically include:
step S201: and receiving a cross-server login request sent by the first server, wherein the cross-server login request comprises a service identifier.
Step S202: and allocating a target second server for the client and generating corresponding allocation information.
Step S203: sending the allocation information to the first server, wherein the allocation information is used for indicating the client to communicate with the target second server.
Different from the embodiment corresponding to fig. 2, in the embodiment of the present invention, a third server is taken as an execution subject, and it can be understood that, when each method step is executed, in the embodiment corresponding to fig. 2, a step of sending to the third server corresponds to a step of receiving by the third server in the embodiment of the present invention, and a step of receiving content by the third server corresponds to a step of sending by the third server in the embodiment of the present invention, which is specifically implemented similar to the embodiment corresponding to fig. 2, and the obtained effect is similar to the embodiment corresponding to fig. 2, and is not described again.
The embodiment of the invention provides a method and a device for game server communication, which are applied to a game service system.A first server in communication with a client receives a cross-server login request which is sent by the client and comprises a service identifier, and can send the cross-server login request to a third server, so that the third server can distribute a target second server for the client according to the cross-server login request and generate corresponding distribution information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service can be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for users; and when users in different regions, languages or platforms need to realize the service, the third server can allocate a target second server for realizing the service to the users only through the communication process, and then the users can realize the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
For example, the service in the first server is a payment service, and the service in the second server is a combat service. As shown in fig. 4, a particular game application scenario is shown.
As shown in fig. 4, the first server cluster may include the first server 1, the first server 2, and the first server 3 of the area 1, and the first server 1, the first server 2, and the first server 3 of the area 2. The second server cluster may include a second server 1, a second server 2, and a second server 3. The third server may be in communication with both the first cluster of servers and the second cluster of servers. By pulling out the "combat" function in the game and deploying the combat function separately in the second cluster of servers to serve players, players from both zone 1 and zone 2 can collectively battle by being connected in common to the set of second clusters of servers based on the allocation of a third server.
When the same service is extracted, the entry function related to the corresponding function also needs to be extracted. And, when the specific implementation is implemented, the second service of the pull-out may be adaptively adjusted according to the actual situation of the game, for example, the result of the pull-out is a "battle" function, and the battle function includes many sub-functions, such as battle playing in battle, available hero, etc., because these sub-functions in the game may be influenced and restricted by political, cultural, and planned delivery plans, therefore, the speech of the game player may be filtered by different sensitive words according to the actual application scenario and the source of the game player; and different heroes and playing methods can be put in according to the composition condition of the same game player.
In an alternative implementation, as shown in FIG. 5, another specific game application scenario is shown. Unlike the gaming application scenario of fig. 4, in the application scenario of fig. 5, the second server cluster is further distinguished, the exemplary second server cluster area a includes the second server 1 and the second server 2 of the area a, and the second server cluster area B includes the second server 1 and the second server 2 of the area B.
Grouping the second server clusters in this embodiment can solve the problem of too high physical delay caused by too far distance between the second server and the first server, or solve the problem of cost or availability. For example, when the game user a is closer to the second server 1 of the second server cluster area a and the game user B is closer to the second server 1 of the second server cluster area B, the third server may preferentially allocate the second server 1 of the second server cluster area a to the game user a and preferentially allocate the second server 1 of the second server cluster area B to the game user B, so that the physical delay caused by too far distance between the second server and the first server may be avoided. For another example, the availability of the second servers of different groups is different, and the higher the cost, the better the availability of the second server group, so that one group of high-availability second servers and multiple groups of low-availability but low-cost second servers can be set according to specific situations, when the third server selects the second server group, the game player with high payment can be preferentially distributed to the high-availability servers, and the like.
It may be understood that, in implementation and application, the second servers may also be grouped in other ways according to an actual application scenario, which is not specifically limited in this embodiment of the present invention.
In summary, the embodiments of the present invention provide a method and an apparatus for game server communication, which are applied to a game service system, in which a first server in communication with a client receives a cross-server login request including a service identifier sent by the client, and can send the cross-server login request to a third server, and then the third server can allocate a target second server to the client according to the cross-server login request, and generate corresponding allocation information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service may be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for the user; and when users in different regions, languages or platforms need to realize the service, the third server can allocate a target second server for realizing the service to the users only through the communication process, and then the users can realize the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
Fig. 6 is a schematic structural diagram of an embodiment of a game server communication apparatus provided in the present invention. A first server applied to a game service system, the game service system further comprising: at least one second server and at least one third server. As shown in fig. 6, the game server communication apparatus provided in this embodiment includes:
a first receiving module 31, configured to receive a cross-server login request sent by a client in communication with the first server, where the cross-server login request includes at least a service identifier;
a first sending module 32, configured to send the cross-server login request to the third server, so as to allocate a target second server to the client through the third server, and generate corresponding allocation information;
a second receiving module 33, configured to receive the allocation information sent by the third server;
a second sending module 34, configured to send the allocation information to the client to instruct the client to communicate with the target second server.
Optionally, the first sending module is specifically configured to: and determining a target second server configured with the service corresponding to the service identifier in the at least one second server through the third server, and generating the distribution information according to the number of the target second server.
Optionally, the determining, by the third server, a target second server configured with a service corresponding to the service identifier in the at least one second server includes: and the third server determines a target second server which is configured with a service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
Optionally, the target second server is allocated to the client by the third server according to the service identifier and the user information.
Optionally, the cross-server login request further includes: user information of the client; and the target second server allocates a target second server to the client for the third server according to the service identifier and the user information.
Optionally, the user information includes at least one of:
and the client side corresponds to the attribute information of the user account, the operating system, the region and the language.
Optionally, different service resources are configured on the first server and the second server.
Optionally, the method further includes:
and the disconnection module is used for disconnecting the communication connection with the client.
To sum up, the method is applied to a game service system, in the system, a first server which is communicated with a client receives a cross-server login request which is sent by the client and comprises a service identifier, and can send the cross-server login request to a third server, so that the third server can allocate a target second server to the client according to the cross-server login request and generate corresponding allocation information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service can be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for users; and when users in different regions, languages or platforms need to realize the service, the third server can allocate a target second server for realizing the service to the users only through the communication process, and then the users can realize the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
Fig. 7 is a schematic structural diagram of an embodiment of a game server communication apparatus provided in the present invention. A third server applied to a game service system, the game service system further comprising: a first server and at least one second server, the apparatus comprising:
a receiving module 41, configured to receive a cross-server login request sent by the first server, where the cross-server login request includes a service identifier;
the distribution module 42 is configured to distribute the target second server to the client and generate corresponding distribution information;
a sending module 43, configured to send the allocation information to the first server, where the allocation information is used to instruct the client to communicate with the target second server.
Optionally, the allocation module is specifically configured to:
and distributing a target second server for the client according to the service identifier, and generating corresponding distribution information.
Optionally, the cross-server login request further includes: user information of the client;
the allocation module is specifically further configured to:
and distributing a target second server to the client according to the service identifier and the user information.
Optionally, the method further includes:
the acquisition module is used for acquiring the load state of the at least one second server;
the allocation module is specifically further configured to:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
In summary, the embodiments of the present invention provide a method and an apparatus for game server communication, which are applied to a game service system, in which a first server in communication with a client receives a cross-server login request including a service identifier sent by the client, and can send the cross-server login request to a third server, and then the third server can allocate a target second server to the client according to the cross-server login request, and generate corresponding allocation information; further, the first server may send allocation information to the client, the allocation information being used to instruct the client to communicate with information of the target second server. That is, in the embodiment of the present invention, an independent game service may be set in the second server, thereby implementing flexible setting of the game service on the second server and providing richer services for the user; when users in different regions, languages or platforms need to implement the service, the third server can allocate a target second server for implementing the service to the user only through the communication process, and then the user can implement the corresponding game service through the connection with the target second server. In the embodiment of the invention, through the arrangement, the users in different regions, languages, platforms or the like can realize the intercommunication of corresponding game services based on the connection between the game client and the second server. In addition, the third server is only responsible for the allocation of the second server according to the cross-server login request of the user as an intermediate server, so that the load of the game server (namely, the first server) is reduced.
The game server communication device provided by each embodiment of the present invention can be used to execute the method shown in each corresponding embodiment, and the implementation manner and principle thereof are the same, and are not described again.
An embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of the preceding embodiments.
Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed, the method is implemented as in any one of the foregoing embodiments.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (16)

1. A method of game server communication, applied to a first server of a game service system, the game service system further comprising: at least one second server and at least one third server, the method comprising:
receiving a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
sending the cross-server login request to the third server, so as to distribute a target second server for the client through the third server and generate corresponding distribution information;
receiving the distribution information sent by the third server;
sending the allocation information to the client to instruct the client to communicate with the target second server.
2. The method of claim 1, wherein the allocating, by the third server, a target second server for the client and generating corresponding allocation information comprises:
and determining a target second server configured with the service corresponding to the service identifier in the at least one second server through the third server, and generating the distribution information according to the number of the target second server.
3. The method of claim 2, further comprising:
determining, by the third server, a target second server configured with a service corresponding to the service identifier in the at least one second server, including:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server through the third server.
4. The method of claim 1, wherein after sending the cross-server login request to the third server, further comprising:
acquiring user information of the client;
the allocating, by the third server, a target second server to the client includes: and distributing the target second server to the client by the third server according to the service identifier and the user information.
5. The method of claim 1, wherein the cross-server login request further comprises: user information of the client;
the allocating, by the third server, a target second server to the client includes:
and distributing the target second server to the client by the third server according to the service identifier and the user information.
6. The method according to claim 4 or 5, wherein the user information comprises at least one of:
and the client side corresponds to the attribute information of the user account, the operating system, the region and the language.
7. The method of claim 1, wherein different service resources are configured on the first server and the second server.
8. The method of claim 1, wherein after sending the allocation information to the client, further comprising:
and disconnecting the communication connection with the client.
9. A method of game server communication, applied to a third server of a game service system, the game service system further comprising: a first server and at least one second server, the method comprising:
receiving a cross-server login request sent by the first server, wherein the cross-server login request comprises a service identifier;
distributing a target second server for the client and generating corresponding distribution information;
sending the allocation information to the first server, wherein the allocation information is used for indicating the client to communicate with the target second server.
10. The method of claim 9,
the allocating a target second server to the client and generating corresponding allocation information includes:
and distributing a target second server for the client according to the service identifier, and generating corresponding distribution information.
11. The method of claim 9, wherein the cross-server login request further comprises: user information of the client;
the allocating the target second server to the client comprises:
and distributing a target second server to the client according to the service identifier and the user information.
12. The method of claim 10, further comprising:
acquiring the load state of the at least one second server;
the allocating a target second server to the client according to the service identifier includes:
and determining a target second server which is configured with the service corresponding to the service identifier and has a load state meeting a preset condition in the at least one second server.
13. A method for game server communication, applied to a game service system, the game service system comprising: the system comprises a first server, at least one second server and at least one third server; the method comprises the following steps:
the first server receives a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
the first server sends the cross-server login request to the third server;
the third server distributes a target second server for the client and generates corresponding distribution information;
the third server sends the allocation information to the first server;
the first server receives the distribution information sent by the third server;
the first server sends the allocation information to the client to instruct the client to communicate with the target second server.
14. An apparatus for game server communication, applied to a first server of a game service system, the game service system further comprising: at least one second server and at least one third server, the apparatus comprising:
a first receiving module, configured to receive a cross-server login request sent by a client that communicates with the first server, where the cross-server login request at least includes a service identifier;
the first sending module is used for sending the cross-server login request to the third server so as to distribute a target second server for the client through the third server and generate corresponding distribution information;
a second receiving module, configured to receive the allocation information sent by the third server;
and the second sending module is used for sending the distribution information to the client so as to indicate the client to communicate with the target second server.
15. An apparatus for game server communication, applied to a third server of a game service system, the game service system further comprising: a first server and at least one second server, the apparatus comprising:
the receiving module is used for receiving a cross-server login request sent by the first server, wherein the cross-server login request comprises a service identifier;
the distribution module is used for distributing a target second server for the client and generating corresponding distribution information;
a sending module, configured to send the allocation information to the first server, where the allocation information is used to instruct the client to communicate with the target second server.
16. A system for game server communication, the system comprising: a first server, at least one second server, and at least one third server, wherein,
the first server is used for receiving a cross-server login request sent by a client communicating with the first server, wherein the cross-server login request at least comprises a service identifier;
the first server is further used for sending the cross-server login request to the third server;
the third server is used for distributing a target second server for the client and generating corresponding distribution information;
the third server is further configured to send the allocation information to the first server;
the first server is further used for receiving the distribution information sent by the third server;
the first server is further configured to send the allocation information to the client to instruct the client to communicate with the target second server.
CN202010031248.XA 2020-01-13 2020-01-13 Game server communication method and device Active CN111282262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010031248.XA CN111282262B (en) 2020-01-13 2020-01-13 Game server communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010031248.XA CN111282262B (en) 2020-01-13 2020-01-13 Game server communication method and device

Publications (2)

Publication Number Publication Date
CN111282262A CN111282262A (en) 2020-06-16
CN111282262B true CN111282262B (en) 2023-04-18

Family

ID=71020196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010031248.XA Active CN111282262B (en) 2020-01-13 2020-01-13 Game server communication method and device

Country Status (1)

Country Link
CN (1) CN111282262B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112090066B (en) * 2020-09-10 2022-05-20 腾讯科技(深圳)有限公司 Scene display method and device based on virtual interactive application
CN112245904B (en) * 2020-11-06 2024-03-12 网易(杭州)网络有限公司 Method, system, storage medium and computer device for supporting cross-service game
CN112604270A (en) * 2020-12-29 2021-04-06 北京冰封互娱科技有限公司 Cross-server method, device and equipment for online game
CN113244607B (en) * 2021-05-13 2023-02-24 北京畅游天下网络技术有限公司 Object matching method of MMORPG game, server group and related equipment
CN113398570B (en) * 2021-06-30 2023-07-21 上海完美时空软件有限公司 Server grouping method, device, storage medium and server cluster

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075521A1 (en) * 2012-09-11 2014-03-13 Tencent Technology (Shenzhen) Company Limited System and method for sharing login status between an application platform and an application
CN105721173A (en) * 2016-04-05 2016-06-29 北京金捷报文化传媒有限公司 Game data transmission method, device and system
CN109718557A (en) * 2019-01-24 2019-05-07 苏州仙峰网络科技股份有限公司 One kind is across taking login method
CN110585697A (en) * 2019-09-09 2019-12-20 网易(杭州)网络有限公司 Cross-server control method and device in game

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075521A1 (en) * 2012-09-11 2014-03-13 Tencent Technology (Shenzhen) Company Limited System and method for sharing login status between an application platform and an application
CN105721173A (en) * 2016-04-05 2016-06-29 北京金捷报文化传媒有限公司 Game data transmission method, device and system
CN109718557A (en) * 2019-01-24 2019-05-07 苏州仙峰网络科技股份有限公司 One kind is across taking login method
CN110585697A (en) * 2019-09-09 2019-12-20 网易(杭州)网络有限公司 Cross-server control method and device in game

Also Published As

Publication number Publication date
CN111282262A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN111282262B (en) Game server communication method and device
CN111084983B (en) Cloud game service method, device, equipment and storage medium
CN107920138B (en) User unified identification generation method, device and system
CN111612461B (en) Interaction method and device based on electronic certificates and electronic equipment
CN110209500B (en) Server load balancing method and device
WO2014194695A1 (en) Method and server for pvp team matching in computer games
CN111555893B (en) Message data transmission method, device, computer equipment and storage medium
CN111659126B (en) Distribution method, device, server, terminal and storage medium of matching process
CN111355723B (en) Single sign-on method, device, equipment and readable storage medium
BR112014020823B1 (en) METHOD, SERVER AND READable MEDIUM TO ALLOCATE GAME RESOURCES
CN110935169B (en) Control method of virtual object, information display method, device, equipment and medium
CN111481939B (en) Game account control method, device, medium and electronic equipment
CN108449606A (en) A kind of barrage method for limiting, device, server and medium
CN103281346A (en) Disconnection reconnection method, network system and proxy server
CN110750780B (en) User role permission fusion method, device and equipment based on multi-service system
CN110113414B (en) Method, device, server and storage medium for managing copies
CN110035128B (en) Live broadcast scheduling method and device, live broadcast system and storage medium
CN111249747B (en) Information processing method and device in game
CN112395024B (en) Interface calling method and related device
CN107800815A (en) A kind of good friend's adding method and device
CN111800491A (en) Data transmission method, system, computing device and storage medium
CN111343240A (en) Service request processing method and device, electronic equipment and storage medium
CN109561050B (en) Method and device for identifying batch account numbers
CN105100075A (en) Game business processing method, equipment and system
CN110661630A (en) Method, device and system for distributing network slice instances

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant