Data processing method and device during game merging, electronic equipment and storage medium
By generating conflict registration and backup data tables, name conflicts in game servers are handled automatically, solving the problem of low efficiency in handling duplicate name fields in existing technologies, and achieving efficient development and operation.
Patent Information
- Application Number
- CN202411877096.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Existing technologies suffer from low development and maintenance efficiency in handling duplicate name fields during game server merges, necessitating an automated processing mechanism to improve efficiency.
Generate a conflict registration data table, build a backup data table and a conflict transfer data table. Use these data tables to automatically process name conflicts in the game server, generate new names and update the data tables, avoiding duplicate checks on unregistered fields.
It significantly improves the efficiency of handling duplicate name fields when merging game servers, reduces the need for comprehensive processing of all fields, and improves development and operation efficiency.
Smart Images

Figure CN119680206B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a data processing method, apparatus, electronic device, and storage medium for game server merging. Background Technology
[0002] With the rapid development of online games, the number of players is constantly increasing. To cope with this, game operators often merge game servers, combining multiple servers into one to allow the server to support more players while ensuring smooth gameplay. Since players on different game servers may use the same name, duplicate names may occur during the server merge process. Therefore, when merging these servers, it is necessary to resolve the name conflict issue.
[0003] The current method for handling duplicate name issues during server merges involves manually adding duplicate name detection logic to each table storing player information in the database. Furthermore, each table needs to be checked and processed separately during the merge. This repetitive approach of developing and maintaining individual data tables significantly reduces development and operational efficiency.
[0004] Therefore, how to provide an automated mechanism for handling duplicate name fields during server merging to improve development and operation efficiency is a technical problem that needs to be solved. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a data processing method, apparatus, electronic device and storage medium for game server merging, which can improve the efficiency of handling duplicate name fields during game server merging and the development and maintenance efficiency of game data tables.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] In a first aspect, the present invention provides a data processing method for merging game servers. The method includes: determining a game data table that needs to be conflict-handled, and generating a conflict registration data table based on the game data table name and name field name; generating a backup data table corresponding to the game data table in the merged game server and constructing a conflict transfer data table; based on the conflict registration data table, searching for the existence of the name under the name field name in the backup data table based on all names under the name field name in the game data table of the target game server; if it exists, generating a new name for the name, and writing the new name and the unique code corresponding to the name in the backup data table into the conflict transfer data table; modifying the backup data table of the merged game server according to the conflict transfer data table, and then merging the contents of the modified backup data table into the game data table of the target game server.
[0008] Secondly, the present invention provides a data processing device for game server merging, comprising: a conflict registration module and a naming conflict processing module; the conflict registration module is used to determine the game data table that needs to be conflict-processed, and generate a conflict registration data table according to the game data table name and the name field name; the conflict registration module is also used to generate a backup data table corresponding to the game data table in the merged game server; the naming conflict processing module is used to construct a conflict transfer data table; the naming conflict processing module is also used to, based on the conflict registration data table, search for the existence of the name under the name field name in the backup data table based on all names under the name field name in the game data table of the target game server; the naming conflict processing module is also used to, if it exists, generate a new name for the name, and write the new name and the unique code corresponding to the name in the backup data table into the conflict transfer data table; the naming conflict processing module is also used to modify the backup data table of the merged game server according to the conflict transfer data table, and then merge the contents of the modified backup data table into the game data table of the target game server.
[0009] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the data processing method for game server merging described in the first aspect.
[0010] Fourthly, the present invention provides a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the data processing method for game server merging as described in the first aspect.
[0011] The data processing method, apparatus, electronic device, and storage medium provided in this invention for game server merging first generate a conflict registration data table to register all game data tables that require conflict resolution. Then, backup data tables are generated for the relevant game data tables in the merged game servers, and a conflict transfer data table is constructed. Next, based on the information in the conflict registration data table, conflict detection is performed on all names under the "Register Name" field of the registered game data in the target game server in the backup data table. Once a naming conflict is found, new names are generated for these names, and these new names and their corresponding unique codes from the backup data table are recorded in the conflict transfer data table. Finally, based on the conflict transfer data table, the backup data table of the merged game server is updated, and the updated content is merged into the game data table of the target game server. The entire process only involves conflict detection and processing of data tables and fields registered in the conflict registration data table; no additional conflict detection and processing is required for other data tables or unregistered fields. Furthermore, by using the backup data table, fields with name conflicts can be easily modified individually, avoiding comprehensive processing of all fields, thereby significantly improving processing efficiency.
[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A schematic flowchart illustrating the data processing method for game server merging provided in an embodiment of the present invention;
[0015] Figure 2 A schematic diagram illustrating the naming conflict resolution process provided in an embodiment of the present invention;
[0016] Figure 3 A functional block diagram of a data processing device for game server merging provided in an embodiment of the present invention;
[0017] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0020] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0021] The existing mechanism for handling duplicate fields during server merges performs duplicate name checks on each table in the database separately. Considering that each data table only differs in the fields with the same name, the processing for developing and maintaining a single data table is repetitive, which greatly reduces development and operation efficiency. The present invention provides an automated mechanism for handling duplicate fields during game server merges, which automates the manual repetitive operation and improves development and operation efficiency.
[0022] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a data processing method for game server merging provided in an embodiment of the present invention. The execution subject of this method can be a technical electronic device with data processing capabilities, and mainly includes the following steps:
[0023] S101: Determine the game data table that needs to be conflict-handled, and generate a conflict registration data table based on the game data table name and name field name;
[0024] S102: Generate backup data tables corresponding to the game data tables in the merged game servers and construct conflict transfer data tables;
[0025] S103: Based on the conflict registration data table, and considering all names under the name field in the game data table of the target game server, search for the existence of a name under the name field in the backup data table;
[0026] In essence, the game server being merged refers to the server that needs to export and integrate the game data. The target game server, on the other hand, is the server responsible for receiving the imported game data and ultimately completing the merging process.
[0027] S104: If it exists, generate a new name for the name and write the new name and the unique code corresponding to the name in the backup data table into the conflict relay data table;
[0028] S105: Modify the backup data table of the game server being merged based on the conflict relay data table, and then merge the contents of the modified backup data table into the game data table of the target game server.
[0029] In the method of steps S101 to S105 provided in this embodiment of the invention, firstly, a conflict registration data table is generated to register all game data tables that need conflict handling. Then, backup data tables are generated for the relevant game data tables in the game server to be merged, and a conflict transfer data table is constructed. Next, based on the information in the conflict registration data table, conflict detection is performed on all names under the "registered name" field of the registered game data in the target game server in the backup data table. Once a naming conflict is found, new names are generated for these names, and these new names and their corresponding unique codes in the backup data table are recorded in the conflict transfer data table. Finally, based on the conflict transfer data table, the backup data table of the game server to be merged is updated, and the updated content is merged into the game data table of the target game server. The entire process only involves conflict detection and handling of data tables and fields registered in the conflict registration data table; no additional conflict detection and handling are required for other data tables or unregistered fields. Furthermore, by using the backup data table, fields with name conflicts can be easily modified individually, avoiding comprehensive processing of all fields, thereby significantly improving processing efficiency.
[0030] The data processing process provided in the embodiments of the present invention will now be described in detail and clearly with reference to the accompanying drawings.
[0031] In step S101, the game data table that needs to be conflict-handled is first determined, and then the conflict registration data table is generated.
[0032] In one embodiment of the present invention, the game developer can manually enter the names of the game data tables to be processed and the field names of the conflict names in the conflict registration data table. It should be noted that the data tables registered in the conflict registration data table do not mean that they have passed the conflict detection and are confirmed to require conflict processing. Rather, they are data tables that the game developer has pre-set and planned to perform conflict detection and processing before the server merge operation.
[0033] For example, suppose there are two game servers, server X and server Y, and we want to merge them into server Z. Both server X and server Y have a game data table named "Players" to store player names, with the corresponding field name being "Username". When it's determined that the game data table named "Players" needs conflict resolution, "Players" and "Username" are manually entered into the conflict registration data table.
[0034] Understandably, multiple game data table names that require conflict handling can be registered simultaneously in the conflict registration data table, as shown in Table 1.
[0035] Table 1
[0036]
[0037]
[0038] By using the conflict registration data table, it is possible to quickly identify which game data tables in the merged server need conflict handling, while game data tables not in the conflict registration data table do not need to undergo conflict detection and handling. This avoids performing a separate conflict detection and handling process for each data table, thus improving efficiency.
[0039] In step S102, this embodiment of the invention first generates a backup data table for the game data tables registered in the merged server. The backup table has the same table structure and data as the original game data table, only the table name is different. In one implementation, the backup data table name can be represented by adding the suffix "_temp" to the original table name. For example, if the original game data table name is "Players", then the corresponding backup data table name could be "Players_temp". It should be understood that this method is merely an example, and game developers can set it flexibly; this embodiment of the invention does not limit it.
[0040] In one embodiment of the present invention, in addition to generating a backup data table, a conflict transfer data table is also pre-generated. Its name can be flexibly set based on the original game data table name. For example, if the original game data table name is "Players", then the corresponding conflict transfer data table name could be "Players_conflict". The specific settings can be customized by the game developer, and this embodiment of the present invention does not limit the scope of the invention.
[0041] The conflict relay data table is shown in Table 2. The table has two columns: one for key and the other for name. The key field is used to maintain a unique code for the conflicting names in the backup data table, and the name field is used to maintain a new name generated based on the conflicting name.
[0042] Table 2
[0043] Key name 20 Sun 1 … …
[0044] By using a conflict transfer table, the new name and unique code corresponding to the conflicted name in the backup data table can be maintained. This provides a basis for quickly modifying the conflicted name in the backup data table and can improve processing efficiency.
[0045] After completing the above preparations, the data tables from the merged server can be imported into the database of the target game server. Before importing the data, the data tables from the merged game server need to be exported. In this invention, a multi-threaded mode can be used for data export, which can be implemented through the following methods:
[0046] Step a1: Obtain the size of each data table in the merged game server;
[0047] Step a2: Allocate threads for each data table based on the size of the data table and the total number of threads;
[0048] Step a3: Export the data tables based on the threads corresponding to each data table.
[0049] In other words, during the startup process, the size of each data table in the merged game server can be obtained through the database interface. Based on the database's multi-threading capabilities, these data tables are evenly distributed among the threads according to their data volume to achieve automated data export. Data tables in the merged game server that do not require conflict handling, as well as backup data tables, will be completely exported to the corresponding block export files for subsequent import.
[0050] During the data import process, embodiments of the present invention can also employ a multi-threaded mode to import pre-exported data—namely, data tables from the merged game server that do not require conflict handling and backup data tables—into the target game server's database in parallel. After the data import is complete, the naming conflict handling process can be executed, i.e., step S103.
[0051] In step S103, based on the conflict registration data table, and based on all names under the name field in the game data table of the target game server, a search is conducted in the backup data table to see if any names exist under the name field.
[0052] In one embodiment of the present invention, the specific game data table corresponding to the game data table name recorded in the conflict registration data table can be located within the target game server. Then, based on the recorded name field, all names under the corresponding name field in the game data table are read, and these read names are checked against the same name field in the backup data table to see if they already exist. If these names are found to exist in the backup table, the program will execute step S104; otherwise, no processing is required.
[0053] In step S104, if there are duplicate names, the process for generating a new name based on the given name, as provided in this embodiment of the invention, is executed. Please refer to [link to relevant documentation]. Figure 2 , Figure 2 A schematic diagram of a naming conflict resolution process provided in an embodiment of the present invention includes the following steps:
[0054] Step b1: Determine if the name exceeds the preset maximum name length;
[0055] In one embodiment of the present invention, the maximum length of the name can be flexibly set according to actual needs, and is not limited here.
[0056] If so, proceed to step b5: after deleting at least one character from the name, return to step b2.
[0057] If not, proceed to step b2: determine a target character as the suffix of the name according to the character order of the preset character sequence to obtain candidate names;
[0058] In this embodiment of the invention, the preset character sequence can be any combination of numbers, letters, symbols, etc. For example, the number sequence can be 1, 2, 3, ..., N, and the letter sequence can be a, b, c, d, ... z. Of course, the letters in the letter sequence can also be uppercase letters, which is not limited here.
[0059] Understandably, when determining the target character, it can be selected either in the order of the character sequence or in reverse order. For example, in a sequence of numbers, the target character is first determined to be 1 in the order from front to back, then 2 in the next selection, and so on.
[0060] Step b3: Check if there are candidate names in the game data table, or in the game data table and conflict transfer data table;
[0061] In this embodiment of the invention, if the conflict transfer data table is empty, then the existence of a candidate name is checked under the name field in the game data table;
[0062] If the conflict transfer data table is not empty, then check whether there are candidate names in the name field of the game data table and in the conflict transfer data table.
[0063] Understandably, the conflict relay table is initially an empty table. If multiple game servers are being merged, for the first merged server, if there are duplicate names during conflict resolution, the conflict relay table will be empty when generating a new name. For subsequent merged game servers, the conflict relay table will not be empty when generating a new name, so both the game data table and the conflict relay table must be checked to see if the new name still conflicts.
[0064] If it does not exist, proceed to step b4: use the candidate name as the new name;
[0065] If it exists, return to step b2;
[0066] In this embodiment of the invention, during the character deletion process, characters at any position can be deleted, and then a target character is determined from the character sequence according to the character order as a suffix to form a new name. It can be understood that the target character selected this time is the character following the previously determined target character.
[0067] To understand the above process more intuitively, take an example: Suppose the name with the same name is "Sun". First, check whether this name exceeds the preset length limit, such as 5 characters. If the length does not exceed, then a number sequence 1, 2, 3...N will be used as a suffix when generating a new name. First, use the number 1 as the suffix to generate the candidate name "Sun 1". If "Sun 1" does not have the same name, then it can be determined as the final new name. If "Sun 1" still has the same name, then continue to use the number 2 as the suffix to generate '"Sun 2", and so on, until a new name without the same name is found. If the name with the same name is "The sun emits light", and its length exceeds 5 characters, then the last character'mang' will be deleted to get "The sun emits light", and then continue to generate a new name according to the above method until a final new name without the same name is obtained.
[0068] After generating a new name through the above steps b1 to step b6, write the unique code corresponding to the name with the same name in the new name and the backup data table into the conflict transfer data table.
[0069] After traversing each target game data table in the conflict registration data table, the backup data table can be renamed and replaced in combination with the conflict transfer data table, and then the data merging can be completed based on the replaced backup data table, that is, execute step S105.
[0070] In step S105, the names with conflicts in the merged game server can be modified in the following way:
[0071] Step c1: Traverse the conflict transfer data table, and extract each new name and the unique code corresponding to the new name;
[0072] Step c2: Retrieve the name corresponding to the unique code in the backup data table of the merged game server according to the unique code, and replace the name corresponding to the unique code with the new name.
[0073] It can be understood that when all the names with conflicts in the backup data table are replaced, the content of the entire backup data table can be imported into the game data table with the same name in the target game server until all the backup data tables are merged.
[0074] In summary, the data processing method for game server merging provided in this embodiment of the invention has the following advantages: It generates a conflict registration data table, where all data tables requiring naming conflicts and their conflicting fields are registered, and automatically backs up and converts the data tables requiring naming conflicts. It employs a multi-threaded mode, which can evenly distribute data across multiple export file blocks based on the amount of data in the data tables, thereby improving data processing efficiency. It automatically reads the backup data table and compares it with the name field of the data table with the same name on the target server. Through iterative comparison and matching, it automatically handles name conflicts until the uniqueness of the new name is ensured.
[0075] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a data processing device 30 for game server merging is given below. Please refer to [link / reference]. Figure 3 , Figure 3 This is a functional block diagram of a data processing device for game server merging provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the data processing device 30 for game server merging provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The data processing device 30 for game server merging includes: a conflict registration module 301 and a naming conflict handling module 302;
[0076] The conflict registration module 301 is used to determine the game data table that needs to be conflict-handled, and to generate a conflict registration data table based on the game data table name and the name field name.
[0077] The conflict registration module 301 is also used to generate backup data tables corresponding to the game data tables in the merged game servers;
[0078] The naming conflict handling module 302 is used to build a conflict relay data table;
[0079] The naming conflict handling module 303 is also used to search for the existence of a name in the name field of the backup data table based on all names under the name field in the game data table of the target game server, according to the conflict registration data table;
[0080] The naming conflict handling module 303 is also used to generate a new name for the name if it exists, and write the new name and the unique code corresponding to the name in the backup data table into the conflict transfer data table;
[0081] The naming conflict handling module 303 is also used to modify the backup data table of the game server being merged based on the conflict transfer data table, and then merge the contents of the modified backup data table into the game data table of the target game server.
[0082] It is understandable that the conflict registration module 301 and the naming conflict handling module 302 can work together. Figure 1 Each step in the process is designed to achieve the corresponding technical effect.
[0083] In an optional implementation, the naming conflict resolution module 302 can also be used to perform, for example... Figure 2 Steps b1 to b6 shown are used to achieve the corresponding technical effects.
[0084] In an optional implementation, the naming conflict handling module 302 is further specifically used to detect whether there is a candidate name under the name field name in the game data table if the conflict transfer data table is empty; and to detect whether there is a candidate name under the name field name in the game data table and in the conflict transfer data table if the conflict transfer data table is not empty.
[0085] In an optional implementation, the naming conflict handling module 302 is also used to traverse the conflict transfer data table, extract each new name and the unique code corresponding to the new name; retrieve the name corresponding to the unique code in the backup data table of the merged game server according to the unique code, and replace the name corresponding to the unique code with the new name.
[0086] In an optional implementation, the data processing device 30 for merging game servers further includes a data export module, used to obtain the size of each data table of the merged game server; allocate threads to each data table according to the size of the data table and the total number of threads; and export the data table based on the threads corresponding to each data table.
[0087] In an optional implementation, the data processing device 30 for merging game servers further includes a data import module for importing the data exported by each thread into the database of the target game server in parallel.
[0088] It should be noted that the module division in the above embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical entities, or have two or more units integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing executable program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] This invention also provides an electronic device 40, please refer to [link to relevant documentation]. Figure 4 , Figure 4 The electronic device 40 provided in this embodiment of the invention includes a memory 401, a processor 402, and a communication interface 403. The memory 401, processor 402, and communication interface 403 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0091] Optionally, the bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0092] In this embodiment of the invention, the processor 402 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this embodiment of the invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment of the invention can be directly manifested as execution by the hardware processor, or execution by a combination of hardware and software modules within the processor. The software modules may reside in the memory 401, and the processor 402 reads the program instructions from the memory 401 and, in conjunction with its hardware, completes the steps of the aforementioned methods.
[0093] In this embodiment of the invention, the memory 401 can be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or it can be volatile memory, such as RAM. The memory can also be any other medium capable of carrying or storing desired executable program code having an instruction or data structure form and accessible by a computer, but is not limited thereto. The memory in this embodiment of the invention can also be a circuit or any other device capable of implementing a storage function for storing instructions and / or data.
[0094] The memory 401 can be used to store software programs and modules, such as the instructions / modules of the data processing device 30 for game server merging provided in this embodiment of the invention. These can be stored in the memory 401 in the form of software or firmware, or embedded in the operating system (OS) of the electronic device 40. The processor 402 executes various functional applications and data processing by executing the software programs and modules stored in the memory 401. The communication interface 403 can be used for signaling or data communication with other node devices.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0096] Understandable. Figure 4 The structure shown is for illustrative purposes only; the electronic device 40 may also include components that are more advanced than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof.
[0097] Electronic device 40 may also include network devices. These network devices include, but are not limited to, a single game server, a server group consisting of multiple game servers, or a cloud based on cloud computing consisting of a large number of hosts or game servers.
[0098] Based on the above embodiments, this application also provides a storage medium storing a computer program. When the computer program is executed by a computer, it causes the computer to execute the data processing method for game server merging provided in the above embodiments.
[0099] Based on the above embodiments, this invention also provides a computer program that, when run on a computer, causes the computer to execute the data processing method for game server merging provided in the above embodiments.
[0100] Based on the above embodiments, this invention also provides a chip for reading a computer program stored in a memory and for executing the data processing method for game server merging provided in the above embodiments.
[0101] This invention also provides a computer program product, including instructions that, when run on a computer, cause the computer to execute the data processing method for game server merging provided in the above embodiments.
[0102] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by instructions. These instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0103] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0104] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0105] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data processing method for game server merges, characterized in that, The method includes: Identify the game data tables that need conflict resolution, and generate a conflict registration data table based on the game data table name and the name field name; Generate backup data tables corresponding to the game data tables in the merged game servers and construct conflict transfer data tables; Based on the conflict registration data table, and considering all names under the name field in the game data table of the target game server, search for the existence of the name under the name field in the backup data table; If it exists, a new name is generated for the name, and the new name and the unique code corresponding to the name in the backup data table are written into the conflict relay data table; Modify the backup data table of the merged game server according to the conflict relay data table, and then merge the contents of the modified backup data table into the game data table of the target game server.
2. The data processing method for game server merging according to claim 1, characterized in that, Generate a new name for the given name, including: Determine whether the name exceeds the preset maximum name length; If not, a target character is determined as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name; In the game data table, or in both the game data table and the conflict transfer data table, detect whether the candidate name exists; If it does not exist, the candidate name will be used as the new name; If it exists, return to the step of determining a target character as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name, until the candidate name does not exist in the game data table, or in the game data table and the conflict transfer data table, and then use the candidate name as the new name; If so, then after deleting at least one character of the name, return to the step of determining a target character as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name.
3. The data processing method for game server merging according to claim 2, characterized in that, Detecting the existence of the candidate name in the game data table, or in both the game data table and the conflict transfer data table, includes: If the conflict transfer data table is empty, then check whether the candidate name exists under the name field in the game data table; If the conflict transfer data table is not empty, then check whether the candidate name exists under the name field of the game data table and in the conflict transfer data table.
4. The data processing method for game server merging according to claim 1, characterized in that, Modifying the backup data table of the merged game server according to the conflict relay data table includes: Traverse the conflict relay data table and extract each new name and its corresponding unique code; The name corresponding to the unique code is retrieved from the backup data table of the merged game server based on the unique code, and the name corresponding to the unique code is replaced with the new name.
5. The data processing method for game server merging according to claim 1, characterized in that, After generating backup data tables corresponding to the game data tables in the merged game servers and constructing conflict relay data tables, the method further includes: Obtain the size of each data table of the merged game server; Based on the size of the data table and the total number of threads, allocate threads to each data table; The data tables are exported based on the threads corresponding to each of the data tables.
6. The data processing method for game server merging according to claim 5, characterized in that, The method further includes: The data exported by each thread is imported in parallel into the database of the target game server.
7. A data processing device for merging game servers, characterized in that, include: Conflict registration module and naming conflict handling module; The conflict registration module is used to determine the game data table that needs to be conflict-handled, and generate a conflict registration data table based on the game data table name and the name field name. The conflict registration module is used to generate a backup data table corresponding to the game data table in the merged game server; The naming conflict handling module is used to construct a conflict relay data table; The naming conflict handling module is further configured to, based on the conflict registration data table and all names under the name field name in the game data table of the target game server, search for whether the name exists under the name field name in the backup data table; The naming conflict handling module is further configured to generate a new name for the name if the conflict exists, and write the new name and the unique code corresponding to the name in the backup data table into the conflict transfer data table. The naming conflict handling module is further configured to modify the backup data table of the merged game server according to the conflict relay data table, and then merge the contents of the modified backup data table into the game data table of the target game server.
8. The data processing device for game server merging according to claim 7, characterized in that, The naming conflict handling module is specifically used for: Determine whether the name exceeds the preset maximum name length; If not, a target character is determined as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name; In the game data table, or in both the game data table and the conflict transfer data table, detect whether the candidate name exists; If it does not exist, the candidate name will be used as the new name; If it exists, return to the step of determining a target character as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name, until the candidate name does not exist in the game data table, or in the game data table and the conflict transfer data table, and then use the candidate name as the new name; If so, then after deleting at least one character of the name, return to the step of determining a target character as the suffix of the name according to the character order of the preset character sequence to obtain a candidate name.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the data processing method for game server merging as described in any one of claims 1-6.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data processing method for game server merging as described in any one of claims 1-6.
Citation Information
Patent Citations
Data table merging processing method and device
CN110347683A
Data processing method and device
CN113440858A