Game data migration method and device, storage medium, and computer equipment
By simulating login requests, loading data and generating simulated character creation requests, automatic migration of game data is realized, solving the high workload and inefficiency problems caused by manual operation of databases in the prior art, and improving migration efficiency and accuracy.
Patent Information
- Application Number
- CN202111322400.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-12-18
AI Technical Summary
In the prior art, game data migration requires manual operation of the database, which consumes a lot of labor and leads to large workload, high cost and low efficiency.
By sending a simulated login request to the source game server, loading the migration object data to the preset data storage area, and generating a simulated character creation request, sending the request to the target game server to realize the automatic migration of game data.
It greatly reduces the workload of game service providers for game data migration, saves manpower and time costs, and improves migration efficiency and accuracy.
Smart Images

Figure CN114138740B_ABST
Abstract
Description
[0001] This invention is a divisional application of the Chinese patent application submitted to the China Patent Office on December 18, 2020, with application number 202011506374.2 and titled "Game data migration method and device, storage medium, and computer equipment." Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a game data migration method and device, a storage medium, and a computer device. Background Art
[0003] During the current game operation, there will be operations that require players to migrate to other servers. On the one hand, players no longer have opponents in their own game servers and need to migrate to more challenging game servers, or players need to migrate to the game servers where their friends are and play games with their friends. For example, a player is playing in server 1, but his friend is playing in server 2 (servers 1 and 2 are on different physical machines), and the player needs to go to server 2 to play games with his friend. Alternatively, an offline competition needs to be held to aggregate player data from different game servers to the same game server competition. Players can log in to the game server of the competition using their original accounts to participate in various activities and other competitions together. On the other hand, when a small number of players exploit loopholes in the game rules to obtain huge amounts of rare paid props, since the props obtained by the players may have been used or merged and decomposed for complex consumption, in order to balance and fairness the game, it is necessary to perform more complex data recovery on the problematic player data, or if a player accidentally releases and destroys very rare props such as pet equipment, it is necessary to perform separate recovery on the data of the player's specified module.
[0004] like Figure 1 As shown, for player data migration, it is necessary to export the database of the server where the player is located to the local computer, and then manually spell out the query statement to query all the player's data. The queried data is then manually spliced into an insert statement for the database, and then the insert statement is executed in the database of the game server to be migrated to complete the migration, which is very labor-intensive. Summary of the invention
[0005] In view of this, the present application provides a game data migration method and device, storage medium, and computer equipment, which help reduce the workload of game service providers in migrating game data, save manpower costs and time costs, and improve the efficiency and accuracy of game data migration.
[0006] According to one aspect of the present application, a game data migration method is provided, comprising:
[0007] In response to a game data migration request, determining migration object information and migration destination information;
[0008] Based on the migration object information, generate and send a simulated login request for the corresponding migration object to the corresponding source game server, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request;
[0009] generating a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area;
[0010] The simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism.
[0011] Optionally, the migration object information includes at least one migration object identifier; generating and sending a simulated login request for the corresponding migration object to the corresponding source game server based on the migration object information specifically includes: determining a matching first migration game server according to the migration object identifier, and sending the simulated login request including the migration object identifier to the first migration game server, wherein the source game server includes the first migration game server; or, sending the simulated login request including the migration object identifier to the game server in a polling or broadcast manner.
[0012] Optionally, determining the matching first migration game server according to the migration object identifier specifically includes: obtaining the first migration game server that matches the migration object identifier from the migration object information, or determining a preset source game server as the first migration game server, or querying the first migration game server corresponding to the migration object identifier in a preset identifier-server mapping table.
[0013] Optionally, after obtaining the first migration game server matching the migration object identifier from the migration object information, or determining the preset source game server as the first migration game server, sending the simulated login request including the migration object identifier to the first migration game server, the method further includes:
[0014] If the first migration game server returns an error prompt message indicating that any migration object identifier does not match the first migration game server, or if the preset data storage area does not contain migration object data corresponding to all migration objects, then obtaining a migration object identifier to be determined that does not match the first migration game server or lacks migration object data;
[0015] Querying the preset identifier-server mapping table for a second migration game server corresponding to the to-be-determined migration object identifier, generating and sending a simulated login request corresponding to the to-be-determined migration object identifier to the second migration game server, wherein the source game server includes the second migration game server; or
[0016] Sending a simulated login request corresponding to the to-be-determined migration object identifier to the game server in a polling or broadcasting manner.
[0017] Optionally, the migration destination information includes at least one target object identifier; sending the simulated character creation request to the target game server corresponding to the migration destination information specifically includes: determining a matching first target game server according to the target object identifier, and sending the simulated character creation request containing the target object identifier to the first target game server, wherein the target game server includes the first target game server; or, sending the simulated character creation request containing the target object identifier to the game server in a polling or broadcast manner.
[0018] Optionally, determining the matching first target game server according to the target object identifier specifically includes: obtaining the first target game server that matches the target object identifier from the destination information, or determining a preset target game server as the first target game server, or querying the first target game server corresponding to the target object identifier in a preset identification-server mapping table.
[0019] Optionally, after obtaining the first target game server matching the target object identifier from the destination information, or determining a preset target game server as the first target game server, sending the simulated character creation request including the target object identifier to the first target game server, the method further includes:
[0020] If the first target game server returns an error message indicating that any target object identifier does not match the first target game server, or if the target game server does not generate successful execution results corresponding to all simulated character creation requests, then obtaining a target object identifier to be determined that does not match the first target game server or lacks a successful execution result;
[0021] querying the preset identifier-server mapping table for a second target game server corresponding to the target object identifier to be determined, and sending a simulated character creation request corresponding to the target object identifier to be determined to the second target game server, wherein the target game server includes the second target game server; or
[0022] Sending a simulation character creation request corresponding to the target object identifier to be determined to the game server in a polling or broadcasting manner.
[0023] Optionally, the migration object information includes at least one migration object identifier, and the migration destination information includes a third target game server corresponding to the at least one migration object identifier, wherein the target game server includes the third target game server; and sending the simulated character creation request to the target game server corresponding to the migration destination information specifically includes:
[0024] The simulated character creation request is sent to the third target game server.
[0025] Optionally, when the number of migration object identifiers is greater than two, generating and sending a simulated login request for a corresponding migration object to a corresponding source game server based on the migration object information specifically includes:
[0026] Based on the source game server corresponding to the migration object identifier, grouping the migration object identifier to determine at least one migration object identifier group;
[0027] Generate and send a simulated login request corresponding to the migration object identification group to the source game server corresponding to the migration object identification group.
[0028] Optionally, generating a simulated role creation request corresponding to the migration object according to the migration object data in the preset data storage area specifically includes:
[0029] According to the migration object data in the preset data storage area, modifying the preset type characters contained in the migration object data;
[0030] Based on the modified migration object data, a simulation role creation request corresponding to the migration object is generated.
[0031] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes the recovery data type; generating a simulation character creation request corresponding to the migration object according to the migration object data in the preset data storage area specifically includes:
[0032] generating a simulation role creation request matching the restored data type according to the migration object data in the preset data storage area;
[0033] Accordingly, sending the simulated character creation request to the target game server corresponding to the migration destination information so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the character creation mechanism, specifically includes:
[0034] The simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the recovery data type in the target game server, and stores the migration object data according to the simulated character creation request.
[0035] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes the recovery data type; generating a simulation character creation request corresponding to the migration object according to the migration object data in the preset data storage area specifically includes:
[0036] According to the migration object data in the preset data storage area, modify the data in the migration object data corresponding to the restored data type, and generate a simulation role creation request corresponding to the modified migration object data;
[0037] Accordingly, sending the simulated character creation request to the target game server corresponding to the migration destination information so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the character creation mechanism, specifically includes:
[0038] The simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the migration object in the target game server and stores the migration object data according to the simulated character creation request.
[0039] According to another aspect of the present application, a game data migration device is provided, comprising:
[0040] A migration request response module, used to respond to a game data migration request and determine migration object information and migration destination information;
[0041] A first request sending module, configured to generate and send a simulated login request of the corresponding migration object to the corresponding source game server based on the migration object information, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request;
[0042] A creation request generation module, used for generating a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area;
[0043] The first data migration module is used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism.
[0044] Optionally, the migration object information includes at least one migration object identifier; and the first request sending module specifically includes:
[0045] a first request unit, configured to determine a matching first migration game server according to the migration object identifier, and send the simulated login request including the migration object identifier to the first migration game server, wherein the source game server includes the first migration game server; or
[0046] The second request unit is used to send the simulated login request including the migration object identifier to the game server in a polling or broadcasting manner.
[0047] Optionally, the first request unit is specifically used to: obtain the first migration game server that matches the migration object identifier from the migration object information, or, determine the preset source game server as the first migration game server, or, query the first migration game server corresponding to the migration object identifier in a preset identifier-server mapping table.
[0048] Optionally, when the first migration game server matching the migration object identifier is obtained from the migration object information, or when a preset source game server is determined as the first migration game server, the device further includes:
[0049] A first identification acquisition module is used for acquiring a to-be-determined migration object identification that does not match the first migration game server or lacks migration object data if the first migration game server returns an error prompt message indicating that any migration object identification does not match the first migration game server, or if the preset data storage area does not contain migration object data corresponding to all migration objects, after sending the simulated login request including the migration object identification to the first migration game server;
[0050] A second request sending module is used to query the second migration game server corresponding to the migration object identifier to be determined in the preset identifier-server mapping table, generate and send a simulated login request corresponding to the migration object identifier to be determined to the second migration game server, wherein the source game server includes the second migration game server; or
[0051] The third request sending module is used to send a simulated login request corresponding to the to-be-determined migration object identifier to the game server in a polling or broadcasting manner.
[0052] Optionally, the migration destination information includes at least one target object identifier; the first data migration module specifically includes:
[0053] a first migration unit, configured to determine a matching first target game server according to the target object identifier, and send the simulated character creation request including the target object identifier to the first target game server, wherein the target game server includes the first target game server; or
[0054] The second migration unit is used to send the simulated character creation request containing the target object identifier to the game server in a polling or broadcasting manner.
[0055] Optionally, the first migration unit is specifically used to: obtain the first target game server that matches the target object identifier from the destination information, or determine a preset target game server as the first target game server, or query the first target game server corresponding to the target object identifier in a preset identification-server mapping table.
[0056] Optionally, when the first target game server matching the target object identifier is acquired from the destination information, or a preset target game server is determined as the first target game server, the apparatus further includes:
[0057] A second identification acquisition module is used for, after sending the simulated character creation request including the target object identification to the first target game server, if the first target game server returns an error message indicating that any target object identification does not match the first target game server, or if the target game server does not generate execution success results corresponding to all simulated character creation requests, then obtaining a target object identification to be determined that does not match the first target game server or lacks execution success results;
[0058] A second data migration module is used to query the second target game server corresponding to the target object identifier to be determined in the preset identifier-server mapping table, and send a simulated character creation request corresponding to the target object identifier to be determined to the second target game server, wherein the target game server includes the second target game server; or
[0059] The third data migration module is used to send a simulated character creation request corresponding to the target object identifier to be determined to the game server in a polling or broadcasting manner.
[0060] Optionally, the migration object information includes at least one migration object identifier, the migration destination information includes a third target game server corresponding to the at least one migration object identifier, and the target game server includes the third target game server; the first data migration module is specifically used to: send the simulation character creation request to the third target game server.
[0061] Optionally, when the number of migration object identifiers is greater than two, the first request sending module specifically includes:
[0062] a grouping unit, configured to group the migration object identifiers based on the source game servers corresponding to the migration object identifiers, and determine at least one migration object identifier group;
[0063] The third request unit is used to generate and send a simulated login request corresponding to the migration object identification group to the source game server corresponding to the migration object identification group.
[0064] Optionally, the creation request generation module specifically includes:
[0065] A character modification unit, configured to modify a preset type of characters contained in the migration object data according to the migration object data in the preset data storage area;
[0066] The creation request generating unit is used to generate a simulation role creation request based on the modified migration object data.
[0067] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes a recovery data type; the creation request generation module specifically includes:
[0068] A first statement generating unit, configured to generate a simulated role creation request matching the restored data type according to the migration object data in the preset data storage area;
[0069] Accordingly, the first data migration module specifically includes:
[0070] The third migration unit is used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the recovery data type in the target game server, and stores the migration object data according to the simulated character creation request.
[0071] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes a recovery data type; the creation request generation module specifically includes: a second statement generation unit, used to modify the data corresponding to the recovery data type in the migration object data according to the migration object data in the preset data storage area, and generate a simulation character creation request corresponding to the modified migration object data;
[0072] Correspondingly, the first data migration module specifically includes: a fourth migration unit, used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the migration object in the target game server, and stores the migration object data according to the simulated character creation request.
[0073] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned game data migration method is implemented.
[0074] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned game data migration method when executing the program.
[0075] By means of the above technical scheme, the present application provides a method and device for migrating game data, a storage medium, and a computer device, which respond to a game data migration instruction, determine the migration object information and the migration destination information, send a simulated login request to the source game server corresponding to the migration object, load the migration object data corresponding to the migration object in the source game server into a preset data storage area, and then generate a simulated role creation request based on the migration object data in the area, so that the target game server stores the migration object data in the target data server corresponding to the target game server based on the simulated role creation request. Compared with the manual data migration method based on the database in the prior art, the present application loads the game data to be migrated corresponding to the game character to be migrated into a preset data storage area, and generates a corresponding simulated role creation request, so that the target game server realizes the game data migration of the migration object according to the role creation mechanism, and stores the migration object data in the target data server, which greatly reduces the workload of the game service provider for game data migration, saves manpower cost and time cost, and improves the efficiency and accuracy of game data migration.
[0076] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0078] Figure 1 A schematic diagram showing a flow chart of a game data migration method in the prior art is shown;
[0079] Figure 2 A flowchart of a game data migration method provided in an embodiment of the present application is shown;
[0080] Figure 3 A flowchart of another game data migration method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0081] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0082] In this embodiment, a game data migration method is provided. Figure 2 As shown, the method includes:
[0083] Step 101, in response to a game data migration request, determining migration object information and migration destination information;
[0084] Step 102, based on the migration object information, generating and sending a simulated login request for the corresponding migration object to the corresponding source game server, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request;
[0085] Step 103, generating a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area;
[0086] Step 104, sending the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism.
[0087] The embodiments of the present application can be applied to the terminal device where the game data migration tool is located to realize the migration of game data to the data server. Specifically, the game data of the game character can be migrated from one data server to another data server, wherein the data server refers to the server that stores all the game data of the game character corresponding to a specific game area, and the game server is used to process various logics in the game process.
[0088] In the actual game process, when the player logs in, the game server loads the game data related to the player in the data server into the game server cache, and the game server and the client exchange data, so as to realize the game experience of the player in the game world with the game character as the carrier. For example, the game area where the player's game character is located is area 1, and area 1 corresponds to the game server A1 and the data server B1. The game data corresponding to the game character is stored in the data server B1. When the player logs in the game account on the client, the client sends a login request to the game server A1. After receiving the login request, the game server A1 loads the game data corresponding to the game account in the data server B1 to realize the verification of the game account login. After the verification is successful, the game server A1 exchanges data with the client, so that the game character completes various game behaviors in the game world. In addition, in the process of the player experiencing the game, the game data in the game server A1 will change with the behavior of the game character. The game server A1 can synchronize the game data in the game server to the data server by writing the operation log of the game data to the data server in real time, at a fixed time, or when the game character logs out. During the actual game process, when a player creates a game character, the player can send a new character creation instruction to the game server through the client. The game server creates a new character in the cache and records the operation log of the new character creation, thereby synchronizing the operation log to the data server in real time and regularly. The data server realizes the creation of a new character based on the operation log.
[0089] It should be noted that the data servers corresponding to different game zones can be set in independent physical devices or in different partitions of the same physical device; the game servers corresponding to different game zones can also be set in independent physical devices or in different partitions of the same physical device; the data servers and game servers corresponding to the same game zone can also be set in independent physical devices or in different partitions of the same physical device; different physical devices and different partitions on physical devices can be isolated from each other. In this embodiment, the game data migration request can be initiated by the player, for example, the player actively submits a migration request when he feels that there are no competitors in the zone or when he wants to play games with his friends in the same game zone, and specifies the target game server or the target player he wants to play with. The game data migration request can also be initiated by the game service provider. For example, the user activity in this area (one server usually corresponds to one game area) is low. Specifically, based on the activity statistics, all game characters in a game area can be forced to migrate after the activity of the game area falls below a preset threshold. The official specifies the target game server or the player selects the target game server. For example, when the official holds a game event, players can sign up freely. The official can establish a separate server for the event, and the data of all registered players need to be migrated to the server before the event starts.
[0090] In an embodiment of the present application, in response to a game data migration request, the source game server corresponding to the migration object is determined according to the migration object information corresponding to the game data migration request (the source game server refers to the game server corresponding to the game zone where the migration object is located). For example, the migration object information includes a game character ID (i.e., a migration object identifier). The game character ID can distinguish different game characters. In the same game, each game character on all game zones corresponds to a unique game character ID. In addition, the target game server corresponding to the game data migration request needs to be obtained, wherein the target game server refers to the game server corresponding to the game zone to which the character to be migrated is planned to migrate. For example, a player initiates a game data migration request, indicating that the game data of the player is to be migrated from game zone 1 to game zone 2, then the migration object identifier can be the game character ID of the player, the source game server is the game server A1 corresponding to game zone 1, and the target game server is the game server A2 corresponding to game zone 2. Those skilled in the art should understand that the above-mentioned game character ID can also be a game user ID used to distinguish different game characters or other identifiers used to distinguish different data, and the present solution is not limited to this.
[0091] Further, the game data migration tool sends a simulated login request to the source game server corresponding to the migration object. After receiving the simulated login request, the source game server uses a mechanism similar to that used when a game account logs into the game to load the game data related to the migration object in the data server corresponding to the migration object into the preset data storage area (e.g., memory) of the source game server. Specifically, the game data migration tool configures all game modules involved in the migration object in the game, and automatically splices SQL statements to query the data in the data server according to this configuration, and loads the queried data into the preset data storage area (e.g., memory). The loaded data is the migration object data. For example, the migration object corresponds to game area 1, and the game data migration tool sends a simulated login request to game server A1. After receiving the simulated login request, game server A1 configures all game modules corresponding to the migration object identifier, and automatically splices SQL statements to query the data in data server B1. After obtaining all game data related to the migration, the game data obtained by the query is loaded into the memory of game server A1 as the migration object data. Afterwards, the game data migration of the migration object is implemented based on the migration object data stored in the preset data storage area. Specifically, a simulation character creation request can be generated according to the migration object data. For example, the simulation character creation request can specifically include a game migration data insertion statement. In actual application scenarios, a unified game migration data insertion statement can be generated, or game migration data insertion statements corresponding to different data types can be generated according to the data type. For example, a task game migration data insertion statement is generated for task data, a backpack game migration data insertion statement is generated for backpack data, a friend game migration data insertion statement is generated for friend data, and so on. Finally, a simulated character creation request is sent to the target game server, and game data migration is implemented using a mechanism similar to creating a new game character on the target game server. Specifically, there are two ways to store the migration object data in the target data server based on the character creation mechanism: First, a game migration data insert statement can be executed on the target game server (simulated character creation method), the migration object data is stored in the memory of the target game server, and the operation log of the data storage is recorded. Then, the target game server can write the operation log to the data server corresponding to the game area to which the migration object is planned to be migrated, so that the target data server stores the migration object data based on the operation log, and finally realizes the game data migration between the data servers corresponding to different game areas; second, the game migration data insert statement can be directly forwarded to the target data server through the target game server, so that the target data server executes the insert statement to realize data migration.
[0092] like Figure 3As shown, the game data migration process is illustrated by taking the migration of game data of a migration object from game zone 1 to game zone 2 as an example. Game zone 1 corresponds to game server A1 and data server B1, and game zone 2 corresponds to game server A2 and data server B2. First, the game data migration tool sends a simulated login request to the game server A1. The game server A1 uses a mechanism similar to the game character login to load the game data related to the migration object in the data server B1 into the game server A1 memory. The loaded game data is the migration object data. Secondly, the game data migration tool generates a simulated character creation request according to the migration object data in the game server A1 memory. Finally, the game data migration tool sends the simulated character creation request to the game server A2. The game server A2 implements the migration of the migration object data to the data server B2 through a mechanism similar to the creation of a new game character. Specifically, the game server A2 can execute the game migration data insert statement carried in the simulated character creation request to store the migration object data in the game server A2, and then write the migration object data to the data server B2. The game server A2 can also send the game migration data insert statement carried in the simulated character creation request to the data server B2, and finally realize the game data migration from the data server B1 to the data server B2.
[0093] In addition, for the game data of the migration object on the data server, the corresponding processing method should be determined in combination with the specific game data migration application scenario. For example, for the game data migration instruction initiated by the player to migrate his own game account to other game areas, the game data corresponding to the player's game account can be deleted from the data server corresponding to the original game area while the target game server executes the game migration data insert statement. For another example, for some official game data migration instructions initiated due to activities to migrate the game data of some registered players' game accounts to a specific server, it is only necessary to execute the game migration data insert statement on the target game server without deleting the data. For another example, because the activity of a certain game area is lower than the preset activity threshold, the game data migration instruction is generated. The game migration data insert statement is executed on the target game server to migrate all the game data in the game area and delete all the game data in the original data server.
[0094] By applying the technical solution of this embodiment, in response to the game data migration instruction, the migration object information and the migration destination information are determined, a simulated login request is sent to the source game server corresponding to the migration object, and the migration object data corresponding to the migration object in the source game server is loaded into a preset data storage area, and then a simulated character creation request is generated based on the migration object data in the area, so that the target game server stores the migration object data in the target data server corresponding to the target game server based on the simulated character creation request. Compared with the manual data migration method based on the database in the prior art, the embodiment of the present application loads the game data to be migrated corresponding to the game character to be migrated into a preset data storage area, and generates a corresponding simulated character creation request, so that the target game server realizes the game data migration of the migration object according to the role creation mechanism, and stores the migration object data in the target data server, which greatly reduces the workload of the game service provider for game data migration, saves manpower cost and time cost, and improves the efficiency and accuracy of game data migration.
[0095] In the embodiment of the present application, optionally, the migration object information includes at least one migration object identifier, and step 102 may be:
[0096] Step 102-1: determine a matching first migration game server according to the migration object identifier, and send the simulated login request containing the migration object identifier to the first migration game server, wherein the source game server includes the first migration game server.
[0097] Among them, in step 102-1, "determine the matching first migration game server according to the migration object identifier" can specifically be: obtain the first migration game server that matches the migration object identifier from the migration object information, or, determine the preset source game server as the first migration game server, or, query the first migration game server corresponding to the migration object identifier in the preset identifier-server mapping table.
[0098] In the above embodiment, the migration object information may specify the source game server corresponding to the migration object, or may only include the migration object identifier. In the case where the migration object information includes the source game server, the source game server may be directly obtained from the migration object information; in the case where the migration object information does not include the source game server, firstly, the preset source game server may be used as the source game server that matches the migration object identifier. For example, if there is only one game area other than the game area corresponding to the target game server, the data server corresponding to the game area may be directly used as the source game server; secondly, the pre-set identifier-server mapping table may be used to query the source game server that matches the migration object identifier in the mapping table. For example, a table (i.e., a preset identifier-server mapping table) may be stored in the game data migration tool, which stores the correspondence between the player ID and the server where it is located, i.e., which player IDs / game character IDs are on a certain server. In order to distinguish the source game servers determined at different stages, this application refers to the source game server obtained in the above manner as the first migration game server.
[0099] Furthermore, when obtaining the first migration game server that matches the migration object identifier from the migration object information, or when determining the preset source game server as the first migration game server, the first migration game server information may contain errors. In some cases (for example, the preset identifier-server mapping table is incorrectly configured or not updated in time), the first migration game server obtained using the preset identifier-server mapping table may also contain errors.
[0100] In view of the fact that the first migration game server may have an error, accordingly, after "sending a simulated login request of the corresponding migration object to the corresponding source game server" in step 102, the following may also be included:
[0101] Step 105: if the first migration game server returns an error prompt message indicating that any migration object identifier does not match the first migration game server, or if the preset data storage area does not contain migration object data corresponding to all migration objects, then obtain a migration object identifier to be determined that does not match the first migration game server or lacks migration object data;
[0102] Step 106, querying the second migration game server corresponding to the to-be-determined migration object identifier in the preset identifier-server mapping table, generating and sending a simulated login request corresponding to the to-be-determined migration object identifier to the second migration game server, wherein the source game server includes the second migration game server; or, sending a simulated login request corresponding to the to-be-determined migration object identifier to the game server in a polling or broadcast manner.
[0103] In the above step 105, after sending a game data acquisition request to the first migration game server, for example, sending a request to the game server A2, the game data migration tool can obtain the migration object data in at least two ways. First, the game data migration tool can query the data in the preset data storage area of the game server A2 to find out whether the preset data storage area contains the migration object data that matches the migration object identifier. Second, after receiving the simulated login request, if the game server A2 determines after query that the migration object does not match the game server A2, it returns an error prompt message to the game data migration tool to inform the game data migration tool that the migration object does not match the game server A2 through the error prompt message. If the game data migration tool determines that at least part of the migration object does not match the first migration game server through the above methods (the error prompt message indicates a mismatch or the migration object data of all the migration objects are not obtained in the preset data storage area), then the game data migration tool can obtain the to-be-determined migration object identifier that does not match the first migration game server.
[0104] Further in the above step 106, a second migration game server matching the identifier of the migration object to be determined is queried through a preset identifier-server mapping table (the second migration game server serves as a source game server corresponding to the migration object), and then a simulated login request corresponding to the identifier of the migration object to be determined is sent to the second migration game server; or, a simulated login request corresponding to the identifier of the migration object to be determined is sent to each game server by polling or broadcasting.
[0105] For example, in the polling method, a simulated login request can be sent to any game server. If the to-be-determined migration object corresponds to the game server, the game server can load the migration object data corresponding to the to-be-determined migration object identifier in the corresponding data server into the preset data storage area. Otherwise, the game server does not load any data into the preset data storage area or returns an error prompt. Correspondingly, if it is determined that the to-be-determined migration object does not match the game server or the preset data storage area does not contain the corresponding migration object data, the simulated login request continues to be sent to another game server in the source game server.
[0106] In addition, for the broadcast mode, the game data migration tool simultaneously sends a simulated login request to each game server, and obtains the game server corresponding to the migration object data through the prompt information returned by the game server or by querying the data in the preset data storage area of all game servers, and obtains the corresponding game migration data from the preset data storage area of the game server.
[0107] In any embodiment of the present application, optionally, in parallel with step 102-1, step 102 may be:
[0108] Step 102-2: Send the simulated login request including the migration object identifier to the game server in a polling or broadcasting manner.
[0109] In the above embodiment, if the migration object information contains the migration object identifier but does not contain the source game server, a simulated login request can also be sent to the game server by polling or broadcasting, so that the game server can query whether the migration object identifier carried by the simulated login request matches the game server after receiving the request, and if it matches, the game server will load the migration object data corresponding to itself into the preset data storage area. For specific methods, please refer to the description of the polling and broadcasting methods above, which will not be repeated here.
[0110] In any embodiment of the present application, optionally, step 103 may specifically include:
[0111] Step 103-1, obtaining the database type of the source game server;
[0112] Step 103 - 2 : Generate a simulation role creation request matching the database type according to the migration object data in the preset data storage area.
[0113] In the above embodiment, the data migration of the target game server depends on the target game server executing the simulated role creation request to achieve, so in order to ensure the smooth migration of data, it should be ensured that the simulated role creation request matches the database type of the target game server, and the data migration operation is mainly to migrate the server of the same game, so the database type of the target game server can be determined based on the database type of the source game server, of course, for the case where the target game server is specified in the migration destination information, or the target game server can be directly determined according to the target object identifier specified in the migration destination information, the database type of the target game server can also be directly obtained, and then the data table corresponding to the target game server is determined according to the database type, and the simulated role creation request is generated according to the data table corresponding to the target game server, so that after the target game server executes the simulated role creation request, accurate data migration can be achieved. For example, the game data in the database of the target game server is stored according to data tables of types such as task table, backpack table, copy table, gang table, title table, friend table, etc., so the simulated role creation request corresponding to each data table should be generated according to the above data tables. Then, by executing the simulated character creation requests corresponding to all data tables on the target game server, the player's task table data, backpack table data, copy table data, guild table data, title table data, friend table data, etc. are all migrated to the target game server, so that the integrity and accuracy of the game data migration can be guaranteed.
[0114] In any embodiment of the present application, optionally, step 103 may specifically include: modifying the preset type characters contained in the migration object data according to the migration object data in the preset data storage area; and generating a simulation character creation request based on the modified migration object data.
[0115] In the above embodiment, for the special preset type characters contained in the migration object data, in order to avoid the influence of special characters on the game migration data insertion statement, for example, the preset type characters may be required to be used in computer programs, and the migration object data (such as game signatures, guild names, etc.) may contain symbols (such as single quotes), the preset type characters in the migration object data can be modified, for example, the single quote is modified to the form of (backslash + single quote), and the game migration data insertion statement is further generated according to the modified migration object data to ensure that when the target game server executes the game migration data insertion statement carried by the simulation character creation request, data insertion errors will not occur due to the special characters contained in the migration object data, thereby improving the data migration accuracy.
[0116] In any embodiment of the present application, the migration destination information may optionally include a target object identifier and / or a target game server. For example, if player A wants to play a game with his friend player B in a game zone, the player B's ID, i.e., the target object identifier, may be specified in the game data migration request, or player A may directly specify the target game server to which the game is planned to be migrated, or may specify both the target object identifier and the target game server at the same time.
[0117] For the case where the migration destination information includes a target game server but does not include a target object identifier. Specifically, the migration object information includes at least one migration object identifier, and the migration destination information includes a third target game server corresponding to the at least one migration object identifier, wherein the target game server includes the third target game server. Step 104 may specifically be:
[0118] Step 104-1, sending the simulated character creation request to the third target game server.
[0119] In the above step 104-1, the simulated character creation request can be directly sent to the third target game server, so that the third target game server executes the simulated character creation request and inserts the migration object data into the third target game server, so that the migration object data insertion statement is written to the data server of the game zone where the third target game server is located through the third target game server, so as to realize the migration of the migration object data to the data server corresponding to the target game server. After the game data is migrated, for example, from the data server B1 corresponding to the game zone 1 to the data server B2 corresponding to the game zone 2, when the player logs in to the game account on the client, the client interacts with the game server A2 corresponding to the game zone 2 to realize the game experience in the game zone 2.
[0120] In the case where the migration destination information includes the target object identifier, or includes the target object identifier and the target game server, optionally, step 104 may specifically be:
[0121] Step 104-2, determining a matching first target game server according to the target object identifier, and sending the simulated character creation request including the target object identifier to the first target game server, wherein the target game server includes the first target game server;
[0122] Among them, in step 104-2, "determining the matching first target game server according to the target object identifier" can specifically be: obtaining the first target game server that matches the target object identifier from the destination information, or determining the preset target game server as the first target game server, or querying the first target game server corresponding to the target object identifier in the preset identification-server mapping table.
[0123] In the above embodiment, similar to step 102-1 of the embodiment of the present application, for the case where the migration destination information includes the target object identifier and the target game server, the target game server (i.e., the first target game server) can be directly obtained from the migration destination information. For the case where the target game server is not included in the corresponding migration destination information, firstly, the preset target game server can be used as the target game server that matches the target object. For example, since there are fewer players in some game areas, the official is encouraging the players in the game area to actively change the server and specify the recommended server, which is used as the target game server; secondly, the pre-set identifier-server mapping table can be used to query the target game server that matches the target object identifier in the mapping table.
[0124] Further, when the first target game server matching the target object identifier is obtained from the destination information, or a preset target game server is determined as the first target game server. Optionally, after step 104, the following may also be included:
[0125] Step 107, if the first target game server returns an error message indicating that any target object identifier does not match the first target game server, or if the target game server does not generate successful execution results corresponding to all simulated character creation requests, then obtain a target object identifier to be determined that does not match the first target game server or lacks a successful execution result;
[0126] Step 108, querying the second target game server corresponding to the target object identifier to be determined in the preset identifier-server mapping table, and sending a simulated character creation request corresponding to the target object identifier to be determined to the second target game server, wherein the target game server includes the second target game server; or, sending a simulated character creation request corresponding to the target object identifier to be determined to the game server in a polling or broadcast manner.
[0127] In the above step 107, after sending the simulated character creation request to the first target game server, the first target game server can determine whether the target object matches the first target game server based on the target object identifier carried in the simulated character creation request. Specifically, it can query whether the game character identification information corresponding to the first target game server contains the target object identifier. If it does, the simulated character creation request can be processed and the migration object data can be inserted into the specific game data storage area of the first target game server. If it does not contain the target object identifier, it will not be executed.
[0128] Here, the first target game server handles the simulation character creation request in a manner similar to character creation, that is, according to the character creation method, a character with the same data as the migration object is created in the first target game server (a new character for the first target game server), and the data of the character is stored.
[0129] For example, a simulated character creation request is sent to game server A3. For the game data migration tool, there are at least two ways to determine whether the game data can be successfully migrated. First, the game data migration tool can query the data in the specific game data storage area of game server A3 to find out whether the specific area contains migration object data that matches the migration object identifier. Second, after receiving the simulated character creation request, if the game server A3 determines that the target object identifier does not match the game server A3, it returns an error message to the game data migration tool to inform the game data migration tool through the error message that the target object corresponding to the simulated character creation request does not match the game server A3. If the game data migration tool determines that at least part of the simulated character creation request does not match the first target game server (the error message indicates a mismatch or the migration object data of all migration objects are not obtained in the specific area), then the game data migration tool can obtain the target object identifier to be determined that does not match the first target game server.
[0130] Further, in the above step 108, the second target game server that matches the identifier of the target object to be determined is queried through the preset identifier-server mapping table (the second target game server serves as the target game server corresponding to the target object), and then a simulated character creation request corresponding to the identifier of the target object to be determined is sent to the second target game server; or, a simulated character creation request corresponding to the identifier of the target object to be determined is sent to each game server by polling or broadcasting.
[0131] For example, for the polling method, a simulated role creation request can be sent to any game server in the target game server. If the target object identifier to be determined carried in the simulated role creation request corresponds to the game server, the game server executes the corresponding game migration data insertion statement according to the role creation mechanism, and can also feedback the corresponding success prompt information after successful execution. For the game data migration tool, it can be determined whether the data migration is successful in at least two ways. First, the game data migration tool can query the data in the specific game data storage area of the game server to find out whether the preset data storage area contains the migration object data matching the migration object identifier. Second, whether the success prompt information / error prompt information returned by the game server is received. If there is no corresponding data in the specific game data storage area of the game server or when receiving the error prompt information returned by the game server (or no success prompt information is received), continue to send the migration data insertion statement to the next game server in the target game server.
[0132] In addition, for the broadcast mode, the game data migration tool sends a migration data insertion statement to each game server at the same time, and determines whether the migration object data is successfully inserted based on a method similar to the above polling.
[0133] In any embodiment of the present application, optionally, in parallel with step 104-2, step 104 may be:
[0134] Step 104-3: Send the simulated character creation request including the target object identifier to the game server in a polling or broadcasting manner.
[0135] In the above embodiment, when the corresponding migration object information includes the target object identifier but does not include the target game server, a simulated character creation request can also be sent to each game server by polling or broadcasting, so that after receiving the simulated character creation request, the game server stores the migration object data in the game server according to the simulated character creation request when the target object identifier matches the game server. The specific method can be found in the description of polling and broadcasting above, which will not be repeated here.
[0136] In an embodiment of the present application, optionally, if the number of migration object identifiers contained in the migration object information exceeds two, and the source game server is determined based on the migration object identifier (i.e., the first migration game server matching the migration object identifier is obtained from the migration object information, or, the preset source game server is determined as the first migration game server, or, the first migration game server corresponding to the migration object identifier is queried in the preset identifier-server mapping table), then step 102 "sending a simulated login request corresponding to the migration object to the source game server corresponding to the migration object" can specifically be: based on the source game server corresponding to the migration object identifier, the migration object identifier is grouped to determine at least one migration object identifier group; and a simulated login request corresponding to the migration object identifier group is generated and sent to the source game server corresponding to the migration object identifier group.
[0137] In the above embodiment, in order to improve the data migration efficiency, when there are multiple game characters that need to perform data migration, after determining the source game server corresponding to each migration object, the migration objects are grouped according to the source game servers to which the migration objects belong, and the migration object identifiers belonging to the same source game server are divided into the same migration object identifier group, so that the corresponding migration object data can be obtained simultaneously in groups corresponding to the migration objects of the same source game server. Compared with the method of migrating game data one by one according to the game characters in the prior art, this helps to improve the data migration efficiency.
[0138] In addition, for the application scenario of player data recovery, for example, when a player makes an operational error and damages an in-game item or a game account is stolen, game data recovery is required. In the embodiment of the present application, optionally, when the game data migration request is specifically a game data recovery request, the migration object information includes the recovery data type, and step 103 may specifically include:
[0139] Step 103-3, generating a simulation role creation request matching the restored data type according to the migration object data in the preset data storage area;
[0140] Accordingly, step 104 may specifically include:
[0141] Step 104-4, sending the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the recovery data type in the target game server, and stores the migration object data according to the simulated character creation request.
[0142] In step 103-3 and step 104-4, for the data recovery application scenario, the migration object and the target object may be the game character to be recovered, and the source game server and the target game server may be the game servers corresponding to the game character to be recovered. Specifically, after the game data migration tool sends a migration data acquisition request to the source game server, the source game server loads the migration object data matching the migration object in the corresponding data backup server (for the same game area, the corresponding data server and data backup server can be two independent physical devices, or different partitions of the same physical device) into the preset data storage area, and then the game data migration tool can generate a simulated character creation request matching the recovery data type according to the migration object data in the preset data storage area, and further, send the simulated character creation request to the target game server (here the target game server can specifically refer to a specific game data storage area in the game server that is isolated from the preset data storage area), so that the target game server deletes the old data from the target game server and inserts the migration object data into the specific game data storage area after executing the simulated character creation request, and then writes the migration object data into the corresponding data server to realize the recovery of the game data, for example, requesting to restore the backpack data, then generating a backpack data insert statement, deleting the migration object data in the target game server and executing the backpack data insert statement. Realizing the data recovery of the game data of the recovery data type of the character to be restored can make it extremely convenient for players who need to return to the game to seamlessly migrate data, greatly improving the game experience of the players.
[0143] In the embodiment of the present application, optionally, step 103 may specifically include:
[0144] Step 103-4, modifying the data corresponding to the restored data type in the migration object data according to the migration object data in the preset data storage area, and generating a simulation role creation request corresponding to the modified migration object data;
[0145] Accordingly, step 104 may specifically include:
[0146] Step 104-5, sending the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the migration object in the target game server, and stores the migration object data according to the simulated character creation request.
[0147] The difference from step 103-3 and step 104-4 is that in step 103-4 and step 104-5, for the migration object data in the preset data storage area, the migration object data is first modified according to the recovery data type, and then a simulated character creation request corresponding to the modified migration object data is generated to restore all game data. For example, in response to the behavior of using plug-ins to obtain game props in the game, the game operator can modify the game prop data in the preset data storage area to modify it to the game prop data that can be obtained by the player's compliant behavior, thereby generating a simulated character creation request for the modified migration object data, so that the target game server deletes the old data from the target game server and executes the simulated character creation request, and then inserts the migration object data into the specific game data storage area, and then writes the migration object data to the corresponding data server to achieve game data recovery.
[0148] Further, as Figure 2 The specific implementation of the method, the embodiment of the present application provides a game data migration device, the device comprising:
[0149] A migration request response module, used to respond to a game data migration request and determine migration object information and migration destination information;
[0150] A first request sending module, configured to generate and send a simulated login request of the corresponding migration object to the corresponding source game server based on the migration object information, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request;
[0151] A creation request generation module, used for generating a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area;
[0152] The first data migration module is used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism.
[0153] Optionally, the migration object information includes at least one migration object identifier; and the first request sending module specifically includes:
[0154] a first request unit, configured to determine a matching first migration game server according to the migration object identifier, and send the simulated login request including the migration object identifier to the first migration game server, wherein the source game server includes the first migration game server; or
[0155] The second request unit is used to send the simulated login request including the migration object identifier to the game server in a polling or broadcasting manner.
[0156] Optionally, the first request unit is specifically used to: obtain the first migration game server that matches the migration object identifier from the migration object information, or, determine the preset source game server as the first migration game server, or, query the first migration game server corresponding to the migration object identifier in a preset identifier-server mapping table.
[0157] Optionally, when the first migration game server matching the migration object identifier is obtained from the migration object information, or when a preset source game server is determined as the first migration game server, the device further includes:
[0158] A first identification acquisition module is used for acquiring a to-be-determined migration object identification that does not match the first migration game server or lacks migration object data if the first migration game server returns an error prompt message indicating that any migration object identification does not match the first migration game server, or if the preset data storage area does not contain migration object data corresponding to all migration objects, after sending the simulated login request including the migration object identification to the first migration game server;
[0159] A second request sending module is used to query the second migration game server corresponding to the migration object identifier to be determined in the preset identifier-server mapping table, generate and send a simulated login request corresponding to the migration object identifier to be determined to the second migration game server, wherein the source game server includes the second migration game server; or
[0160] The third request sending module is used to send a simulated login request corresponding to the to-be-determined migration object identifier to the game server in a polling or broadcasting manner.
[0161] Optionally, the migration destination information includes at least one target object identifier; the first data migration module specifically includes:
[0162] a first migration unit, configured to determine a matching first target game server according to the target object identifier, and send the simulated character creation request including the target object identifier to the first target game server, wherein the target game server includes the first target game server; or
[0163] The second migration unit is used to send the simulated character creation request containing the target object identifier to the game server in a polling or broadcasting manner.
[0164] Optionally, the first migration unit is specifically used to: obtain the first target game server that matches the target object identifier from the destination information, or determine a preset target game server as the first target game server, or query the first target game server corresponding to the target object identifier in a preset identification-server mapping table.
[0165] Optionally, when the first target game server matching the target object identifier is acquired from the destination information, or a preset target game server is determined as the first target game server, the apparatus further includes:
[0166] A second identification acquisition module is used for, after sending the simulated character creation request including the target object identification to the first target game server, if the first target game server returns an error message indicating that any target object identification does not match the first target game server, or if the target game server does not generate execution success results corresponding to all simulated character creation requests, then obtaining a target object identification to be determined that does not match the first target game server or lacks execution success results;
[0167] A second data migration module is used to query the second target game server corresponding to the target object identifier to be determined in the preset identifier-server mapping table, and send a simulated character creation request corresponding to the target object identifier to be determined to the second target game server, wherein the target game server includes the second target game server; or
[0168] The third data migration module is used to send a simulated character creation request corresponding to the target object identifier to be determined to the game server in a polling or broadcasting manner.
[0169] Optionally, the migration object information includes at least one migration object identifier, the migration destination information includes a third target game server corresponding to the at least one migration object identifier, and the target game server includes the third target game server; the first data migration module is specifically used to: send the simulation character creation request to the third target game server.
[0170] Optionally, when the number of migration object identifiers is greater than two, the first request sending module specifically includes:
[0171] a grouping unit, configured to group the migration object identifiers based on the source game servers corresponding to the migration object identifiers, and determine at least one migration object identifier group;
[0172] The third request unit is used to generate and send a simulated login request corresponding to the migration object identification group to the source game server corresponding to the migration object identification group.
[0173] Optionally, the creation request generation module specifically includes:
[0174] A character modification unit, configured to modify a preset type of characters contained in the migration object data according to the migration object data in the preset data storage area;
[0175] The creation request generating unit is used to generate a simulation role creation request based on the modified migration object data.
[0176] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes a recovery data type; the creation request generation module specifically includes: a first statement generation unit, used to generate a simulation character creation request matching the recovery data type according to the migration object data in the preset data storage area;
[0177] Correspondingly, the first data migration module specifically includes: a third migration unit, used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data in the target game server that matches the recovery data type, and stores the migration object data according to the simulated character creation request.
[0178] Optionally, the game data migration request includes a game data recovery request, and the migration object information includes a recovery data type; the creation request generation module specifically includes: a second statement generation unit, used to modify the data corresponding to the recovery data type in the migration object data according to the migration object data in the preset data storage area, and generate a simulation character creation request corresponding to the modified migration object data;
[0179] Correspondingly, the first data migration module specifically includes: a fourth migration unit, used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the migration object in the target game server, and stores the migration object data according to the simulated character creation request.
[0180] It should be noted that for other corresponding descriptions of the functional units involved in the game data migration device provided in the embodiment of the present application, reference can be made to Figures 2 to 3 The corresponding description in the method will not be repeated here.
[0181] Based on the above Figures 2 to 3 The method shown in the embodiment of the present application is accordingly provided with a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figures 2 to 3 The game data migration method shown.
[0182] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0183] Based on the above Figures 2 to 3 The method shown in the figure and the above-mentioned virtual device embodiment, in order to achieve the above-mentioned purpose, the embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc., and the computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 2 to 3 The game data migration method shown.
[0184] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
[0185] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0186] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.
[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or can be implemented by hardware in response to a game data migration instruction, determine the migration object information and the migration destination information, send a simulated login request to the source game server corresponding to the migration object, load the migration object data corresponding to the migration object in the source game server into a preset data storage area, and then generate a simulated role creation request based on the migration object data in the area, so that the target game server stores the migration object data in the target data server corresponding to the target game server based on the simulated role creation request. Compared with the manual data migration method based on the database in the prior art, the present application loads the game data to be migrated corresponding to the game character to be migrated into a preset data storage area, and generates a corresponding simulated role creation request, so that the target game server realizes the game data migration of the migration object according to the role creation mechanism, and stores the migration object data in the target data server, which greatly reduces the workload of the game service provider for game data migration, saves manpower cost and time cost, and improves the efficiency and accuracy of game data migration.
[0188] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0189] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A method for migrating game data, characterized in that: include: In response to a game data migration request, determining migration object information and migration destination information, the game data migration request including a game data restoration request, the migration object information including restoration data type; Based on the migration object information, generate and send a simulated login request for the corresponding migration object to the corresponding source game server, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request; Generating a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area, including: generating a simulation role creation request matching the restoration data type according to the migration object data in the preset data storage area; The simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism, including: sending the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server deletes the game data in the target game server that matches the recovery data type, and stores the migration object data according to the simulated character creation request.
2. The method according to claim 1, characterized in that The migration object information includes at least one migration object identifier; and the generating and sending a simulated login request corresponding to the migration object to the corresponding source game server based on the migration object information specifically includes: Obtaining a first migration game server that matches the migration object identifier from the migration object information, or determining a preset source game server as the first migration game server, or searching a preset identifier-server mapping table for the first migration game server corresponding to the migration object identifier; sending the simulated login request containing the migration object identifier to the first migration game server, wherein the source game server includes the first migration game server; or, The simulated login request including the migration object identifier is sent to the game server in a polling or broadcasting manner.
3. The method according to claim 1, characterized in that: The migration destination information includes at least one target object identifier; and sending the simulated character creation request to the target game server corresponding to the migration destination information specifically includes: According to the target object identifier, determine a matching first target game server, and send the simulated character creation request containing the target object identifier to the first target game server, wherein the target game server includes the first target game server; or The simulated character creation request including the target object identifier is sent to the target game server in a polling or broadcasting manner.
4. The method according to claim 3, characterized in that The step of determining the matching first target game server according to the target object identifier specifically includes: The first target game server matching the target object identifier is obtained from the destination information, or a preset target game server is determined as the first target game server, or the first target game server corresponding to the target object identifier is searched in a preset identifier-server mapping table.
5. The method according to claim 4, characterized in that In the case where the first target game server matching the target object identifier is obtained from the destination information, or a preset target game server is determined as the first target game server, after sending the simulated character creation request including the target object identifier to the first target game server, the method further includes: If the first target game server returns an error message indicating that any target object identifier does not match the first target game server, or if the target game server does not generate successful execution results corresponding to all simulated character creation requests, then obtaining a target object identifier to be determined that does not match the first target game server or lacks a successful execution result; querying the preset identifier-server mapping table for a second target game server corresponding to the target object identifier to be determined, and sending a simulated character creation request corresponding to the target object identifier to be determined to the second target game server, wherein the target game server includes the second target game server; or Sending a simulation character creation request corresponding to the target object identifier to be determined to the game server in a polling or broadcasting manner.
6. The method according to claim 1, characterized in that When there are more than two migration object identifiers, based on the migration object information, a simulated login request for the corresponding migration object is generated and sent to the corresponding source game server, specifically including: Based on the source game server corresponding to the migration object identifier, grouping the migration object identifier to determine at least one migration object identifier group; Generate and send a simulated login request corresponding to the migration object identification group to the source game server corresponding to the migration object identification group.
7. The method according to claim 1, characterized in that The game data migration request includes a game data recovery request, and the migration object information includes the recovery data type; and generating a simulation character creation request corresponding to the migration object according to the migration object data in the preset data storage area specifically includes: According to the migration object data in the preset data storage area, modify the data in the migration object data corresponding to the restored data type, and generate a simulation role creation request corresponding to the modified migration object data; Accordingly, sending the simulated character creation request to the target game server corresponding to the migration destination information so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the character creation mechanism, specifically includes: The simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server deletes the game data matching the migration object in the target game server and stores the migration object data according to the simulated character creation request.
8. A game data migration device, characterized in that: include: A migration request response module, configured to determine migration object information and migration destination information in response to a game data migration request, wherein the game data migration request includes a game data recovery request, and the migration object information includes a recovery data type; A first request sending module, configured to generate and send a simulated login request of the corresponding migration object to the corresponding source game server based on the migration object information, so that the source game server loads the migration object data from the source data server to a preset data storage area according to a login mechanism after receiving the simulated login request; a creation request generation module, configured to generate a simulation role creation request corresponding to the migration object according to the migration object data in the preset data storage area, wherein the simulation role creation request matching the restored data type is generated according to the migration object data in the preset data storage area; The first data migration module is used to send the simulated character creation request to the target game server corresponding to the migration destination information, so that the target game server stores the migration object data corresponding to the simulated character creation request to the target data server corresponding to the target game server according to the role creation mechanism, wherein the simulated character creation request is sent to the target game server corresponding to the migration destination information, so that the target game server deletes the game data in the target game server that matches the recovery data type, and stores the migration object data according to the simulated character creation request.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Game data migration method and device, storage medium and computer equipment
CN112650730A