Cross-server system and method for network game, electronic equipment and storage medium
By using mirrored scene synchronization technology between the scene center server and the game server, the problem of data transmission and resource waste during cross-server operations for players on different game servers is solved, enabling cross-server gaming without switching servers and improving computing resource utilization and data accuracy.
Patent Information
- Application Number
- CN202511443255.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-01-16
Smart Images

Figure CN121338337A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network game technology, and in particular to a cross-server system, method, electronic device and storage medium for network games. Background Technology
[0002] In computer network games, multiple game servers are usually set up in order to distribute the player load, improve game performance and stability, ensure a smooth gaming experience for players, and provide personalized game content.
[0003] When players from different game servers need to be visible and interact in the same game scene to play together, cross-server operations are required. Specifically, players need to log in to a specified target game server. The current cross-server gaming method has the following problems:
[0004] (1) Players on different game servers need to log off the game server they are currently logged into and then log off to the target game server. Player data needs to be transferred from the game server they are currently logged into to the target game server, resulting in additional data transmission and storage, network connection reconstruction and login data loading.
[0005] (2) Due to the limited capacity of the target game server, it is unable to meet the demand of a large number of players on the same server;
[0006] (3) In order to meet the cross-server requirements, the target game server needs to allocate more computing resources, which leads to a waste of computing resources of the target game server when there are no common game activities;
[0007] (4) Additional cross-server logic needs to be added during game development, which can easily lead to cross-server data errors. Summary of the Invention
[0008] This invention provides a cross-server system, method, electronic device, and storage medium for online games, enabling players from different game servers to be visible and interact across game scenes without switching servers, so as to play together.
[0009] In a first aspect, the present invention provides a cross-server system for online games, comprising a scene center server and at least two game servers:
[0010] At least two of the game servers are used to receive a mirror registration request for a target scene in the game scene, and to create a mirror scene for the target scene in response to the mirror registration request;
[0011] The first game server of at least two game servers is used to receive player operation data in the mirrored scene from the game client and send the operation data to the scene center server;
[0012] The scene center server is used to synchronize the operation data to the second game server among at least two game servers;
[0013] The second game server is used to update the mirrored scene when it receives the operation data.
[0014] Secondly, the present invention provides a cross-server method for online games, applied to the cross-server system of the online game described in the first aspect, comprising:
[0015] At least two of the game servers receive a mirror registration request for a target scene in the game scene, and respond to the mirror registration request to create a mirror scene for the target scene;
[0016] The first game server of at least two game servers receives the player's operation data in the mirrored scene from the game client and sends the operation data to the scene center server;
[0017] The scene center server synchronizes the operation data to the second game server among at least two game servers;
[0018] The second game server updates the mirrored scene upon receiving the operation data.
[0019] Thirdly, the present invention provides an electronic device, the electronic device comprising:
[0020] At least one processor; and
[0021] A memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the cross-server method for online games as described in the second aspect of the present invention.
[0023] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the cross-server method for online games as described in the second aspect of the present invention.
[0024] The cross-server system for online games of the present invention includes a scene center server and at least two game servers. By creating mirror scenes for a target scene on at least two game servers, the first game server receives player operation data from the game client in the mirror scene and sends the operation data to the scene center server. The scene center server synchronizes the operation data to the second game server. Upon receiving the operation data, the second game server updates the mirror scene. Players from different game servers can enter the mirror scene, and the scene center server synchronizes the mirror scenes on each game server. This allows players from different game servers to see and interact within the same game scene across servers for collaborative gameplay without switching game servers. Because there is no need to switch game servers, the cross-server system for online games of the present invention has the following beneficial effects:
[0025] (1) Since players do not need to switch game servers, the extra data transmission and storage, network connection reconstruction and login data loading caused by switching game servers are avoided, simplifying cross-server game operations.
[0026] (2) Compared to all players logging into a single target game server, the AOI (Area of Interest) calculation logic of the game scene can be distributed across multiple game servers, thereby making full use of the computing resources of multiple game servers and increasing the capacity limit of cross-server games.
[0027] (3) Since players do not need to switch game servers when logging into the original game server, there is no need to allocate additional computing resources for each game server, which improves the utilization rate of computing resources.
[0028] (4) Since there is no need to switch game servers to achieve cross-server, no additional cross-server logic needs to be added during development, which avoids the data errors that are easily caused by switching game servers and ensures the accuracy of the data generated by cross-server games.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a diagram illustrating how cross-server gaming is achieved by switching game servers in existing technologies.
[0032] Figure 2 This is a schematic diagram of the structure of a cross-server system for online games provided in one embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of the structure of a cross-server system for online games provided in another embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of the structure of a cross-server system for online games provided in another embodiment of the present invention;
[0035] Figure 5 This is a schematic diagram of the structure of a cross-server system for online games provided in another embodiment of the present invention;
[0036] Figure 6 This is a schematic diagram of scene resource management in a game server according to an embodiment of the present invention;
[0037] Figure 7 This is an interactive diagram illustrating cross-server data synchronization in online games according to an embodiment of the present invention;
[0038] Figure 8 This is a flowchart of a cross-server method for online games provided by an embodiment of the present invention;
[0039] Figure 9 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0040] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0041] Figure 1 This is a diagram illustrating cross-server functionality in existing online games, such as... Figure 1 As shown, before cross-server play, player A logs into game server 1 through the game client, and player B logs into game server 2 through the game client. Typically, player A selects game server 1 as the host server when registering a game account, which is the default game server for player A every time they log into the game. Player A's relevant game data is stored on game server 1. Similarly, player B selects game server 2 as the host server.
[0042] When gameplay requires players A and B to play together in the same game scene, player A needs to log off from game server 1 and log in to game server 2. This means that player A and player B are logged into the same game server 2 during the gameplay event, and player A is essentially moving from game server 1 to game server 2. Current cross-server gaming technology has the following problems:
[0043] (1) Player A needs to log in to game server 2 after logging off game server 1, and needs to transfer player A's data from game server 1 to game server 2, resulting in additional data transmission and storage, network connection reconstruction and login data loading;
[0044] (2) Due to the limited capacity of game server 2, it is unable to meet the needs of a large number of players playing the game together on game server 2;
[0045] (3) In order to meet the cross-server needs of a large number of players, game server 2 needs to be configured with more computing resources, which leads to a waste of computing resources of game server 2 during non-common game activities;
[0046] (4) Additional cross-server logic needs to be added during game development, which can easily lead to cross-server data errors.
[0047] Based on this, embodiments of the present invention provide a cross-server system, method, electronic device, and storage medium for online games, which enables players from different game servers to be visible and interact across servers in the game scene without switching servers, so as to play together. The specific embodiments are described in detail below.
[0048] Figure 2 This is a schematic diagram of the structure of a cross-server system for online games according to an embodiment of the present invention. The cross-server system for online games in this embodiment is used to enable players who log in to different game servers to see and interact in the same game scene, and to play together in the same game scene across servers.
[0049] like Figure 2 As shown, the cross-server system for online games in this embodiment includes a scene center server and at least two game servers. Figure 2 The diagram shows n game servers, where n can be a positive integer greater than or equal to 2. Each game server can connect to multiple players' game clients. A game server can be the server that a player logs into through their game client. A game server is a server specifically designed to host online games and is used to manage player connections, game status, physics simulation, and multiplayer interaction. A scene center server can communicate with at least two game servers to manage mirrored scenes on the game servers and synchronize data of mirrored scenes between at least two game servers.
[0050] In this embodiment, the game scene can be a virtual three-dimensional or two-dimensional space created in an online game. The game scene is constructed using computer graphics technology and custom game map resources, and can include virtual scene objects such as player characters, system characters, and buildings. When the gameplay of an online game triggers players from different game servers to play together in the same game scene, the system determines the target scene for cross-server gaming between players from different game servers and generates a mirror registration request for that target scene. This mirror registration request is sent to at least two game servers. Upon receiving the mirror registration request, the at least two game servers create a mirror of the target scene, resulting in a mirror scene of the target scene. After each game server creates a mirror scene, players can log in to the game server through the game client and enter the mirror scene. The player character controlled by the player is presented in the mirror scene, and the player can operate the player character in the mirror scene and generate operation data. The game server can receive the player's operation data in the mirror scene from the game client. For example, the operation data can include the player character's movement data, skill release data, virtual transaction data, etc., in the mirror scene. The game server can send the received operation data to the scene center server.
[0051] The scene center server can maintain the association between mirror scenes of each target scene. This association represents the range of game servers that created the mirror scenes. When the scene center server receives the operation data of the player in the mirror scene from the first game server of at least two game servers, the scene center server determines the second game server other than the first game server among the game servers that created the mirror scene of the target scene based on the association, and sends the operation data to the second game server. The second game server uses the received operation data to update the mirror scene in the second game server, so that game clients connected to the first game server and the second game server can synchronously present the same mirror scene.
[0052] Taking the "All-Server PK" gameplay in online games as an example, this gameplay allows defining the scope of game servers participating. For instance, it can define that players from at least two game servers can participate. Other rules can also be defined, such as the minimum game level required for participation. Before the "All-Server PK" gameplay begins, a target scenario can be created, and a mirror registration request can be generated and sent to the game server. Figure 2In this scenario, the game servers participating in the All-People PK (Player vs. Player) event can include Game Server 1 and Game Server 2. The system can generate a mirror registration request and send it to Game Server 1 and Game Server 2. Game Server 1 creates a mirror scene 1 of the All-People PK target scene, and Game Server 2 creates a mirror scene 2 of the All-People PK target scene. Player A, who meets the All-People PK criteria, logs into Game Server 1 through the game client and enters mirror scene 1. Player B, who also meets the All-People PK criteria, logs into Game Server 2 through the game client and enters mirror scene 2. Game Server 1 detects player A's operation data in mirror scene 1, such as the movement data of player A's character in mirror scene 1, and records the movement data of player A's character. The data is sent to the scene center server, which then sends player A's character movement data to game server 2. Game server 2 uses the received movement data to update player A's character movement trajectory in mirror scene 2, achieving synchronized display of player A's character movement trajectory in mirror scene 1 and mirror scene 2. Thus, player A logs into game server 1 (player A's host server), and player B logs into game server 2 (player B's host server). Mirror scenes are created by the game servers respectively, and the scene center server synchronizes the mirror scenes of each game server, enabling players on different game servers to play together across servers without switching game servers.
[0053] The cross-server system for online games in this embodiment simplifies cross-server game operations by eliminating the need for players to switch games and servers, thus avoiding the additional data transmission and storage, network link reconstruction, and login data loading that would result from switching game servers. Furthermore, the AOI (Area of Interest) calculation logic for the game scene can be distributed across multiple game servers, fully utilizing their computing resources and increasing the capacity of cross-server games. Additionally, the elimination of the need to switch game servers and configure additional computing resources for each server improves the utilization rate of computing resources. Moreover, the absence of additional cross-server logic during development avoids data errors that can easily occur when switching game servers, ensuring the accuracy of data generated by cross-server games.
[0054] Figure 3 A schematic diagram of the structure of a cross-server system for online games, as provided in another embodiment of the present invention, is shown below. Figure 3 As shown, in Figure 2Based on the cross-server system of the online game shown, the cross-server system of the online game can also include a gameplay server. This gameplay server communicates with various game servers. The gameplay server can be a server used to manage various gameplays in the online game. Specifically, it is used to generate a mirror registration request for a target scenario when a preset event is detected. The mirror registration request includes at least two game server IDs and is sent to the game server corresponding to the game server ID. For example, the preset event can be an event that triggers the gameplay of the cross-server game. For example, the preset event can be a preset time point or a preset game event, such as the percentage of players who have reached a preset level in the game reaching a preset percentage, etc. When the gameplay server detects a pre-defined event, it indicates that a cross-server game activity needs to be executed. The gameplay server determines the IDs of at least two game servers participating in the cross-server game activity and the target scene ID of the cross-server game activity through pre-configured gameplay. It generates a mirror registration request including the target scene ID and sends it to the game servers corresponding to the at least two game server IDs. When the game server receives the mirror registration request, it creates a mirror scene corresponding to the target scene ID. In this embodiment, an independent gameplay server is set up to manage various gameplays in the online game and can trigger the execution of cross-server game activities in the online game. This realizes that different servers are responsible for different functions and avoids conflicts between specific gameplay logic and the main game logic in the game server.
[0055] Figure 4 A schematic diagram of the structure of a cross-server system for online games, as provided in another embodiment of the present invention, is shown below. Figure 4 As shown above, Figure 3 The gameplay server can be any one or more game servers, meaning the gameplay server and the game server are the same server. In this case, the game server can include a gameplay layer and a mirror entry layer. The gameplay layer implements... Figure 3 The gameplay server includes certain functions, such as the gameplay layer generating a mirror registration request for a target scene when a preset event is detected, and sending the mirror registration request to the mirror entry layer of the game server participating in the cross-server game. The mirror entry layer is used to create a mirror scene of the target scene when it receives the mirror registration request from the gameplay layer. In this embodiment, the game server includes a gameplay layer and a mirror entry layer. The gameplay layer can trigger the cross-server game to generate a mirror registration request, and the mirror entry layer responds to the request to create a mirror scene. There is no need to set up an additional gameplay server, which simplifies the architecture of the cross-server system of online games and reduces system costs.
[0056] Figure 5 A schematic diagram of the structure of a cross-server system for online games, as provided in another embodiment of the present invention, is shown below. Figure 5As shown, the mirror entry layer in the game server includes a mirror creation module. This module creates mirror scenes of the target scene and sends mirror scene registration information to the scene center server. This registration information can include a scene ID and a game server ID. When the scene center server receives the mirror scene registration information, it uses the scene ID and game server ID to generate a mirror scene association relationship. This association relationship includes the scene ID and the game server IDs of at least two game servers that created the mirror scene. For example, assuming the scene for cross-server gameplay A is scene A and the scene for cross-server gameplay B is scene B, after each game server creates a mirror scene of scene A, it generates a mirror scene ID including scene A and the game server ID to represent the association relationship between mirror scenes of scene A. Similarly, it generates a mirror scene ID including scene B and the game server ID to represent the association relationship between mirror scenes of scene B. For example, the scene center server records the mirror scene IDs created by each game server as follows:
[0057] Mirror Scene ID1: A10123, Mirror Scene ID2: A10156, Mirror Scene ID3: A10125, Mirror Scene ID4: B10756, Mirror Scene ID5: B10324. The first digit of the mirror scene ID represents the scene ID, and the second to sixth digits represent the game server ID. Using Mirror Scene IDs 1-3, we can determine that game servers IDs 10123, 10156, and 10125 created mirror scenes of scene A. Using Mirror Scene IDs 4-5, we can determine that game servers IDs 10756 and 10324 created mirror scenes of scene B.
[0058] In another embodiment, the association between mirrored scenes in the scene center server can also be achieved through the following mapping table:
[0059]
[0060] In the game server of this embodiment, the mirror entry layer can create mirror scenes through the mirror creation module and send the registration information of the mirror scenes to the scene center server. This allows the scene center server to maintain the mirror scene association relationship using the scene ID and game server ID in the registration information, so that the mirror scene data can be broadcast and synchronized through the mirror scene association relationship during subsequent mirror scene data synchronization.
[0061] like Figure 5As shown, the mirror entry layer in the game server also includes a mirror scene resource middleware. This middleware manages the data generated by mirror scenes in the game server and controls the lifecycle of mirror scenes. The middleware manages the resources and scene object data of mirror scenes in the game server, controls the creation and destruction of mirror scene lifecycles, and allows gameplay services to flexibly and conveniently obtain and use mirror scene data from the middleware. Figure 6 The diagram illustrates scene resource management in a game server. Resources on the game server can include regular scene resources and mirrored scene resource middleware. The gameplay business layer can obtain and use scene data from these middleware. Scene resources can include scene identifiers, player lists, and item lists. In a mirrored scene, the mirrored scene resource middleware can separately package scene resource data and retrieve data such as the number of players in the mirrored scene, thus isolating mirrored and regular scene resources and preventing mirrored scene data from polluting regular scene data. The gameplay business layer can determine whether to obtain and use data from regular or mirrored scene resources based on the business type. For example, for a game where everyone... In a PK (Player Killing) scenario A, there are two scenarios, regular scenario A and mirror scenario A, on the game server. In the All-People PK mode, players need to reach a preset level. Players who haven't reached the preset level can play in regular scenario A, while players who have reached the preset level can enter mirror scenario A. Both regular and mirror scenarios A have the same objects (such as buildings and NPCs). A mirror scenario resource middleware manages the resource data of mirror scenario A separately, preventing data confusion between objects in mirror scenario A and regular scenario A on the game server. Regular gameplay services can obtain and use business data from the resource data of regular scenario A, while All-People PK gameplay services can obtain and use business data from the resource data of mirror scenario A.
[0062] like Figure 5 As shown, the mirror entry layer in the game server also includes an operation data processing module and a data sending module. The operation data processing module is used to receive the original operation data of the players in the mirror scene from the game client, determine whether the message synchronization cycle has been reached, and if so, process the received original operation data based on the preset message synchronization algorithm to obtain the target operation data. The data sending module is used to serialize the target operation data to obtain serialized data packets and send them to the scene center server.
[0063] The raw operation data can be the data generated when a player enters the mirrored scene, performs game actions within the mirrored scene, and leaves the mirrored scene. The information synchronization algorithm can be an aggregation algorithm based on communication messages, specifically an algorithm that merges player data within a preset time period. Taking player A's movement operation as an example, the game client detects that player A moves from the origin to point A in the mirrored scene in 1 second, then to point B in 1.5 seconds, and then to point C in 2 seconds. The game client sends this movement data as raw operation data to the game server. The game server sets a 2-second collection frequency as the message synchronization cycle. After receiving the raw operation data, the operation data processing module determines that player A moved from the origin to point C within 2 seconds. The operation data processing module generates the target operation data for player A's movement from the origin to point C, eliminating the need to process the movement process from origin to point A to point B to point C. The data sending module sends the target operation data to the scene center server, reducing the frequency and amount of operation data transmission, saving network bandwidth, and improving game smoothness.
[0064] Specifically, when the scene center server receives the operation data of the player in the mirror scene of the first game server, it determines at least one second game server that has created the mirror scene based on the mirror scene association relationship, sends the operation data to the second game server, the second game server updates the mirror scene in the second game server based on the operation data, and sends the updated mirror scene to the game client that communicates with the second game server. The game client is used to display the updated mirror scene.
[0065] For example, the first game server can be any one of multiple game servers that created a mirror scene of the target scene A. The second game server can be any one of the multiple game servers other than the first game server. When player A, who is logged into the first game server, moves in the mirror scene, operation data is generated. The first game server sends the operation data to the scene center server. The scene center server determines at least one second game server that created the mirror scene of the target scene A through mirror association (such as the mapping table mentioned above) so as to send the operation data to the second game server. After receiving the operation data, the second game server updates player A's movement trajectory in the mirror scene of the second game server based on the operation data. This allows other players who are logged into the second game server and enter the mirror scene to see player A's movement through the game client. This enables players from different game servers to play together in one game scene across servers without switching game servers.
[0066] Figure 7 This is a schematic diagram illustrating the cross-server data synchronization interaction in an embodiment of the present invention, such as... Figure 7 As shown, game server 1 creates mirror scene A, and game server 2 creates mirror scene B. Mirror scenes A and B are mirrors of the same game scene C. Player A logs into game server 1 through the game client and enters mirror scene A, while player B logs into game server 2 through the game client and enters mirror scene B. When player A moves their character in mirror scene A, game server 1 collects player A's movement data and determines if the sending cycle has been reached. If so, game server 1 sends player A's movement data to the scene center server. After receiving player A's movement data, the scene center server determines that game server 2 has created... A mirrored scene B of the same game scene C is created. The central server of the scene sends player A's movement data to game server 2. After receiving player A's movement data, game server 2 replays player A's movement trajectory in the mirrored scene B using player A's movement data and sends it to the game client logged into game server 2. This allows player B to see player A's movement trajectory in the mirrored scene. Thus, player A logs in on game server 1, and player B logs in on game server 2. Players from different game servers can see and interact in the same game scene and play together. Players from different game servers do not need to switch to the same game server to achieve cross-server gaming.
[0067] Figure 8 This is a flowchart illustrating a cross-server method for online games provided by an embodiment of the present invention. This cross-server method is applicable to situations where cross-server gameplay is executed in online games. The method can be performed by a cross-server system of the online game, such as... Figure 8 As shown, the cross-server method for online games in this embodiment of the invention may specifically include the following steps:
[0068] S801. At least two game servers receive a mirror registration request for a target scene in the game scene, and respond to the mirror registration request to create a mirror scene for the target scene.
[0069] like Figure 2 As shown, the cross-server system of the online game in this embodiment includes a scene center server and at least two game servers. When the gameplay of the online game triggers players from different game servers to play together in the same game scene, the system determines the target scene for players from different game servers to play together across servers, generates a mirror registration request for the target scene, and sends the mirror registration request to at least two game servers. When the at least two game servers receive the mirror registration request, they create a mirror of the target scene and obtain the mirror scene of the target scene.
[0070] In one optional embodiment, after the game server creates a mirror scene of the target scene, it sends mirror scene registration information to the scene center server. The scene registration information may include a scene ID and a game server ID. When the scene center server receives the mirror scene registration information, it uses the scene ID and the game server ID to generate a mirror scene association relationship. The mirror scene association relationship includes the scene ID and the game server IDs of at least two game servers that created the mirror scene, so that data can be broadcast and synchronized through the mirror scene association relationship during subsequent mirror scene data synchronization.
[0071] S802, The first game server of at least two game servers receives the operation data of the player in the mirror scene from the game client and sends the operation data to the scene center server.
[0072] After each game server creates a mirrored scene, players can log in to the game server through the game client and enter the mirrored scene. The player character controlled by the player is presented in the mirrored scene. Players can operate the player character in the mirrored scene and generate operation data. The game server can receive the player's operation data in the mirrored scene from the game client. For example, the operation data may include the player character's movement data, skill release data, virtual transaction data, etc. The game server can send the received operation data to the scene center server.
[0073] It should be noted that the first game server can refer to the server that needs to send operation data to other game servers to update the mirror scene. It can be any one of the at least two game servers that have created the mirror scene. The game server is the first game server when it receives the operation data from the game client.
[0074] In one optional embodiment, the first game server receives the original operation data of the player in the mirror scene from the game client, determines whether the message synchronization period has been reached, and if so, processes the received original operation data based on the preset message synchronization algorithm to obtain the target operation data, serializes the target operation data to obtain serialized data packets, and sends them to the scene center server.
[0075] The raw operation data can be data generated when a player enters the mirrored scene, performs game actions within the mirrored scene, and leaves the mirrored scene. The information synchronization algorithm can be an aggregation algorithm based on communication messages, specifically an algorithm that merges player data within a preset time period. Taking player A's movement operation as an example, the game client detects that player A moves from the origin to point A in the mirrored scene in 1 second, then to point B in 1.5 seconds, and then to point C in 2 seconds. The game client sends this movement data as raw operation data to the game server. The game server sets a 2-second collection frequency as the message synchronization cycle. After receiving the raw operation data, the first game server determines that player A moved from the origin to point C within 2 seconds. The operation data processing module generates the target operation data for player A's movement from the origin to point C, eliminating the need to process the movement process from origin to point A to point B to point C. The first game server sends the processed target operation data to the scene center server, reducing the frequency and amount of operation data transmission, saving network bandwidth, and improving game smoothness.
[0076] S803, the scene center server synchronizes the operation data to the second game server among at least two game servers.
[0077] The scene center server can maintain the association between mirror scenes of each target scene. This association represents the range of game servers that created the mirror scene. When the scene center server receives the operation data of the player in the mirror scene from the first game server among at least two game servers, the scene center server determines the second game server other than the first game server among the game servers that created the mirror scene of the target scene based on the association, and sends the operation data to the second game server.
[0078] S804, the second game server updates the mirror scene upon receiving operation data.
[0079] The second game server updates the mirrored scene in the second game server using the received operation data, so that game clients connected to the first game server and the second game server can synchronously present the same mirrored scene. This enables players from different game servers to see and interact in the same game scene and play together, and allows players from different game servers to achieve cross-server gaming without having to switch to the same game server.
[0080] In this embodiment of the invention, at least two game servers receive a mirror registration request for a target scene in the game scene, and create a mirror scene for the target scene in response to the mirror registration request. The first game server among the at least two game servers receives the operation data of the players in the mirror scene from the game client, and sends the operation data to the scene center server. The scene center server synchronizes the operation data to the second game server among the at least two game servers. The second game server updates the mirror scene when it receives the operation data. Players from different game servers can enter the mirror scene, and the mirror scenes on each game server are synchronized through the scene center server. This allows players from different game servers to achieve cross-server visibility and interaction in the same game scene for joint gameplay without switching game servers. Since there is no need to switch game servers, it has the following beneficial effects:
[0081] (1) Since players do not need to switch game servers, the extra data transmission and storage, network connection reconstruction and login data loading caused by switching game servers are avoided, simplifying cross-server game operations.
[0082] (2) Compared to all players logging into a single target game server, the AOI (Area of Interest) calculation logic of the game scene can be distributed across multiple game servers, thereby making full use of the computing resources of multiple game servers and increasing the capacity limit of cross-server games.
[0083] (3) Since players do not need to switch game servers when logging into the original game server, there is no need to allocate additional computing resources for each game server, which improves the utilization rate of computing resources.
[0084] (4) Since there is no need to switch game servers to achieve cross-server, no additional cross-server logic needs to be added during development, which avoids the data errors that are easily caused by switching game servers and ensures the accuracy of the data generated by cross-server games.
[0085] Figure 9 A schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0086] like Figure 9As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0087] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0088] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as cross-server methods in online games.
[0089] In some embodiments, the cross-server method for online games can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the cross-server method for online games described above can be performed. Alternatively, in other embodiments, processor 41 can be configured to execute the cross-server method for online games by any other suitable means (e.g., by means of firmware).
[0090] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0092] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0093] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0094] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0095] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0096] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0097] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A cross-server system for a network game, characterized by, The scene center server and at least two game servers are included: At least two game servers are configured to receive a mirror registration request for a target scene in a game scene, and create a mirror scene for the target scene in response to the mirror registration request; A first game server of the at least two game servers is configured to receive operation data of a player in the mirror scene from a game client, and send the operation data to the scene center server; The scene center server is configured to synchronize the operation data to a second game server of the at least two game servers; The second game server is configured to update the mirror scene when the operation data is received.
2. The system of claim 1, wherein, A game play server is further included; The game play server is configured to generate a mirror registration request for a target scene when a preset event is detected, the mirror registration request including at least two game server IDs; The mirror registration request is sent to game servers corresponding to the game server IDs; The game servers are configured to create a mirror scene of the target scene when the mirror registration request is received.
3. The system of claim 2, wherein, The game play server is any one of the game servers.
4. The system of claim 2, wherein, The game servers include a mirror entry layer, and the mirror entry layer includes a mirror creation module; The mirror creation module is configured to create a mirror scene of the target scene, and send mirror scene registration information to a scene center server, the scene registration information including a scene ID and a game server ID; The scene center server is configured to generate a mirror scene association relationship using the scene ID and the game server ID when the mirror scene registration information is received, the mirror scene association relationship including the scene ID and game server IDs of at least two game servers that create the mirror scene.
5. The system of claim 4, wherein, The mirror entry layer further includes a mirror scene resource middleware; The mirror scene resource middleware is configured to process data generated by the mirror scene in the game servers, and control a life cycle of the mirror scene.
6. The system of claim 4, wherein, The mirror entry layer further includes an operation data processing module and a data sending module; The operation data processing module is configured to receive original operation data of a player in the mirror scene from a game client; Determine whether a message synchronization period is reached; If yes, process the received original operation data to obtain target operation data based on a preset message synchronization algorithm; The data sending module is configured to serialize the target operation data to obtain a serialized data packet, and send the serialized data packet to the scene center server.
7. The system according to any of claims 4-6, characterized in that, The scene center server is specifically configured to: Determine at least one second game server that has created the mirror scene based on the mirror scene association relationship when operation data of a player in the mirror scene in a first game server is received; Send the operation data to the second game server; The second game server is configured to update the mirror scene in the second game server based on the operation data, and send the updated mirror scene to a game client in communication with the second game server, the game client being configured to display the updated mirror scene.
8. A cross-server method of a network game, characterized in that, The cross-server system applied to the network game of any one of claims 1-7, comprising: At least two game servers receive a mirror registration request for a target scene in a game scene, and create a mirror scene for the target scene in response to the mirror registration request; A first game server of the at least two game servers receives operation data of a player in the mirror scene from a game client, and sends the operation data to the scene center server; The scene center server synchronizes the operation data to a second game server of the at least two game servers; The second game server updates the mirror scene upon receiving the operation data.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the cross-server method of the network game of claim 8.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to implement the cross-server method of the network game of claim 8 when executed.