Data migration method and device, computer program product, equipment and storage medium
Automatically migrate database engine files through full and incremental data migration methods, which solves the problems of data migration affecting data consistency and service interruption in traditional technologies, and achieves data security and service continuity.
Patent Information
- Application Number
- CN202310274168.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2024-09-20
AI Technical Summary
Traditional data migration technology may affect the integrity and consistency of data in operation and maintenance scenarios such as relocation, rollback, and fault recovery, and requires service interruption, resulting in increased data storage costs and poor user experience.
Receive data migration requests through access nodes, adjust the status, and automatically migrate engine files in the database using full and incremental data migration methods to ensure data consistency and security without stopping services.
It realizes automated data migration, reduces the loss caused by manual data synchronization, ensures the security and accuracy of data, and maintains the continuity of database services during the migration process.
Smart Images

Figure CN118672971A
Abstract
Description
Technical Field
[0001] The present application relates to data migration technology, and in particular to a data migration method, device, computer program product, electronic device and storage medium. Background Art
[0002] With the development of computer technology, a large-scale NoSql (non-relational database) distributed storage platform has emerged. This distributed storage platform can be applied to provide game data storage services for various mobile game businesses, such as the Tcaplus data storage system. After the data storage system is released and provided to multiple game project teams, several operation and maintenance scenarios such as relocation, rollback, and fault recovery may affect the data integrity and consistency of the stored data. The data update in traditional technology requires a complete scan of all data in the database, which has a slow update efficiency and generates many holes in the database, increasing the data storage cost of the data system. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a data migration method, device, computer program product, electronic device and storage medium, which can realize automatic data migration of engine files in the database, and at the same time ensure the consistency of the migrated data during the data migration process, reduce data loss caused by tedious manual data synchronization, and ensure data security and accuracy. At the same time, the use of full data migration and incremental data migration can ensure that the service does not need to be stopped during the data migration process, and ensure that normal database data addition, data deletion, data modification and data query services are provided to users.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a data migration method, which includes:
[0006] receiving a data migration request through an access node of the database;
[0007] In response to the data migration request, an engine file that needs to be migrated is obtained in a source storage node of the database;
[0008] In response to the data migration request, adjusting the state of the access node;
[0009] Migrate all engine files from the source storage node to the target storage node of the database;
[0010] Obtain the new data generated by the database during full data migration;
[0011] Incrementally migrate the newly added data from the source storage node to the destination storage node of the database.
[0012] The present application also provides a data migration device, which includes:
[0013] An information transmission module, used for receiving a data migration request through an access node of a database;
[0014] The data migration module is used to obtain the engine file that needs to be migrated in the source storage node of the database in response to the data migration request;
[0015] A data migration module, used to adjust the state of the access node in response to a data migration request;
[0016] The data migration module is used to migrate all the engine files from the source storage node to the destination storage node of the database;
[0017] The data migration module is used to obtain the new data generated by the database during the full data migration;
[0018] The data migration module is used to perform incremental data migration from the source storage node to the destination storage node of the database.
[0019] In the above scheme,
[0020] A data migration module, used to adjust the access node from a normal state to a waiting state when receiving a data migration request;
[0021] The data migration module is used to adjust the access node from the waiting state to the data migration state when the full data migration starts;
[0022] The data migration module is used to adjust the access node from the data migration state to the request cache state when the incremental data migration is completed.
[0023] In the above scheme,
[0024] A data migration module, used for forwarding a received data processing request to a source storage node when the access node is in a data migration state;
[0025] A data migration module, used for caching the received data processing request by the access node when the access node is in a request cache state;
[0026] The data migration module is used for the access node to send the cached data processing request to the destination storage node when the incremental data migration is completed.
[0027] In the above scheme,
[0028] A data migration module, used for establishing a first transmission control protocol connection between a slave node of a source storage node and a master node of a destination storage node;
[0029] A data migration module, used for establishing a second transmission control protocol connection between a slave node of a source storage node and a slave node of a destination storage node;
[0030] A data migration module, used for sharding the engine file to obtain at least two sharded engine files;
[0031] A data migration module, configured to send the sharding engine file to a destination storage node in parallel via a first transmission control protocol connection and a second transmission control protocol connection;
[0032] The data migration module is used to resend the sharding engine file when a retry request for the sharding engine file is received.
[0033] In the above scheme,
[0034] Data migration module, used to configure cyclic redundancy check code for sharding engine files;
[0035] The data migration module is used to verify the cyclic redundancy check code after the sharding engine files are sent to the destination storage node in parallel, and obtain the verification result of the cyclic redundancy check code;
[0036] A data migration module, used to trigger incremental data migration when the verification result of the cyclic redundancy check code is successful;
[0037] The data migration module is used to resend the sharding engine file when the verification result of the cyclic redundancy check code fails.
[0038] In the above scheme,
[0039] The data migration module is used to generate a logical log based on the newly added data through the master node of the source storage node;
[0040] A data migration module, used to send the logical log to the master node of the destination storage node through the master node of the source storage node;
[0041] The data migration module is used to parse the logical log through the master node of the destination storage node to obtain the newly added data;
[0042] A data migration module, used for sending the logical log to the slave node of the destination storage node through the master node of the destination storage node;
[0043] The data migration module is used to parse the logical log through the slave node of the destination storage node to obtain the newly added data.
[0044] In the above scheme,
[0045] A data migration module, used to detect the source of the target game when a data migration request is used to migrate game data;
[0046] The data migration module is used to trigger the manual verification process when the source of the target game fails to pass the development component detection of the mini-game program;
[0047] The data migration module is used to detect the target game through a manual verification process to obtain the control logic and control elements of the target game;
[0048] The data migration module is used to extract data from the control logic and control elements of the target game to obtain the first engine file that needs data migration.
[0049] In the above scheme,
[0050] A data migration module, used to present a virtual character in the display interface of the mini-game program when a control component in the mini-game program is triggered;
[0051] The data migration module is used to obtain the running data of the mini-game program according to the status of the virtual character;
[0052] The data migration module is used to record the target object operation data of the mini-game program according to the running data of the mini-game program;
[0053] The data migration module is used to extract the running data of the mini-game program and the target object operation data to the second engine file that needs data migration.
[0054] In the above scheme,
[0055] A data migration module, used to determine the cloud server network corresponding to the database according to the identification information of the database data;
[0056] The data migration module is used to store the data migration results of the database in the cloud server network;
[0057] The data migration module is used to send the data migration results to the database through the cloud server network when data loss occurs in the database.
[0058] The present application also provides an electronic device, the electronic device comprising:
[0059] A memory for storing executable instructions;
[0060] The processor is used to implement the preceding data migration method when running the executable instructions stored in the memory.
[0061] An embodiment of the present application also provides a computer-readable storage medium storing executable instructions, which can implement the preceding data migration method when executed by a processor.
[0062] The embodiments of the present application have the following beneficial effects:
[0063] 1) The present application receives a data migration request through the access node of the database; in response to the data migration request, obtains the engine file that needs to be migrated in the source storage node of the database; in response to the data migration request, adjusts the state of the access node; performs full data migration of the engine file from the source storage node to the destination storage node of the database; obtains the new data generated by the database during the full data migration; performs incremental data migration of the new data from the source storage node to the destination storage node of the database. In this way, the data migration of the engine files in the database can be automated, and the consistency of the migrated data can be guaranteed during the data migration process, reducing the data loss caused by tedious manual data synchronization, and ensuring the security and accuracy of the data.
[0064] 2) Since both full data migration and incremental data migration are used during the data migration process, it can be ensured that there is no need to stop the service during the data migration process, ensuring that users are provided with normal database data addition, data deletion, data modification and data query services, and ensuring the continuity of users' use of the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a schematic diagram of the use environment of the data migration method provided in the embodiment of the present application;
[0066] Figure 2 A schematic diagram of the structure of a data migration device provided in an embodiment of the present application;
[0067] Figure 3 An optional flowchart of the data migration method provided in the embodiment of the present application;
[0068] Figure 4 A schematic diagram of a data migration process in an embodiment of the present invention;
[0069] Figure 5 This is a schematic diagram of the structure of a data storage engine in an embodiment of the present invention;
[0070] Figure 6 A schematic diagram of structural information of a data storage engine in an embodiment of the present invention;
[0071] Figure 7 A schematic diagram of a process of access node state conversion in an embodiment of the present invention;
[0072] Figure 8 This is a schematic diagram of the process of full data migration in an embodiment of the present invention;
[0073] Fig. 9 A schematic diagram of the process of incremental data migration in an embodiment of the present invention;
[0074] Fig.10 A schematic diagram of storage engine switching in an embodiment of the present invention;
[0075] Fig.11 This is a schematic diagram of the database architecture in this application;
[0076] Fig.12 A process diagram of the data migration method provided by this application;
[0077] Fig.13 This is an optional structural diagram of the first engine file of the game in an embodiment of the present application. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0079] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0080] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0081] 1) Terminals, including but not limited to: ordinary terminals and dedicated terminals, wherein the ordinary terminals maintain a long connection and / or a short connection with the sending channel, and the dedicated terminals maintain a long connection with the sending channel.
[0082] 2) Client, which is a carrier for implementing specific functions in the terminal. For example, a mobile client (APP) is a carrier for specific functions in a mobile terminal, such as the function of executing report making or the function of displaying reports.
[0083] 3) Logical log: A log that records logical changes to data in a database, generally used to synchronize data between databases.
[0084] 4) Data table: In a database, a data table is an object used to store data. It is a collection of structured data and contains one or more fields.
[0085] 5) Field: In the database, the columns of a data table are called fields, and each field contains the information of this column.
[0086] 6) Record: Information about all fields in a row of data in a data table in the database
[0087] 7) Database engine file: a file that stores database records
[0088] 8) KV storage engine: The KV storage engine is a component that provides high-performance reading and writing of KV data structures. It is usually embedded in other database servers to provide a series of solutions for reading and writing KV data from disk.
[0089] 9) IO: Input / Output. In computer science, it refers to the exchange of information between computers or between people and computers. For example, two computers interact through a network card, such as writing data to a hard disk or reading data from a hard disk.
[0090] 10) Physical migration: Data is migrated by migrating the physical copy of the database file, while logical migration completes the migration by inserting, updating, and deleting records.
[0091] Before introducing the data migration method provided by the present application, the data migration process of the database implemented in the related art is first introduced. In the related art, when performing data migration on the database, taking the Mysql database as an example, the data migration of the Mysql database is generally divided into physical migration and logical migration. Physical migration refers to migrating data by migrating the physical copy of the database file, and logical migration refers to completing the migration by inserting, updating and deleting records. Physical migration is suitable for large files and massive data migration. The physical migration of the Mysql database requires a physical backup of all data first, and the Mysql process needs to be stopped in advance. During this process, users cannot access the database, and the downtime migration requires that the Mysql version and configuration must be consistent with the source end, which has poor flexibility. For game programs, once the database is expanded through data migration, it is necessary to stop providing game program services to users. Game program services can only be provided after all data have been migrated, which affects the user experience.
[0092] In order to solve the above-mentioned defects, the embodiments of the present application provide a data migration method, apparatus, device and computer-readable storage medium, which can ensure the consistency of the migrated data during the data migration process, reduce data loss caused by tedious manual data synchronization, and ensure the security and accuracy of the data. At the same time, the use of full data migration and incremental data migration can ensure that the service does not need to be stopped during the data migration process, and ensure that the database provides users with normal data addition, data deletion, data modification and data query services.
[0093] The following describes an exemplary application of the data migration device provided in the embodiment of the present application. The device provided in the embodiment of the present application can be implemented as various types of user terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a smart watch, a smart home appliance, and a vehicle-mounted terminal, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.
[0094] See also Figure 1 , Figure 1 It is an architectural diagram of the data migration system provided in an embodiment of the present application. To support a data migration application, in the data migration system 100, the terminal (terminal 400-1 and terminal 400-2 are shown as examples) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0095] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart home appliance, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0096] The terminal 400 is used to send a data migration request for a target data item to the server 200. In the data migration method application provided in the embodiment of the present application, the terminal includes a terminal 10-1 and a terminal 10-2. The terminal (including the terminal 10-1 and the terminal 10-2) is provided with a client of software capable of displaying corresponding financial transaction information, such as a client or plug-in for performing financial activities with virtual resources or physical resources or paying with virtual resources (such as virtual transaction currency).
[0097] Of course, the data migration device provided by the present invention can be applied to financial activities carried out with virtual resources or physical resources, or to payment environments through physical financial resources (including but not limited to various types of physical financial resource change environments, electronic payment shopping environments, and anti-cheating environments for e-commerce shopping) or information interaction environments of game programs. In financial activities carried out with various types of physical financial resources or payments made through virtual resources, financial information from different data sources is usually processed, and ultimately the updated data of the destination database system is presented on the user interface (UI) of the business party's device.
[0098] In some embodiments of the present invention, the data migration process can be completed by a computing platform. The computing platform can be a platform located in a trusted third-party device, or a platform located in one of multiple servers or distributed in multiple servers. The computing platform can interact with each server for data. Figure 1 The multiple business party servers (which may be servers holding different business data) may be servers of the same data category, for example, they are all bank category servers, or they are all shopping platform servers, etc. Multiple servers may also be servers of different categories, for example, server 10-1 is the head office server of the bank, and server 10-2 is the branch server, or, server 10-1 is the original game program server, and server 10-2 is the expanded game program server to accommodate more game program user data. In the data migration scenario, the business data provided by these servers are usually the same type of business data. For example, the game server will migrate all the player's data between different game program servers. During the entire data service migration process, the data service needs to be uninterrupted, and seamless docking before and after the data service migration can be achieved, so that the user is not aware, and the application data and application services can be successfully migrated without stopping the service, shortening the data service migration time, and effectively improving the data migration efficiency. In other business scenarios, business data may also include other data, which will not be listed here one by one.
[0099] As an example, the server 200 is used to deploy a data migration device to implement the data migration method provided in the present application. When executing the data migration method, the database system includes an access node, a source storage node and a destination storage node.
[0100] The data migration method provided in the embodiment of the present application can also be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving. Taking the cloud technology scenario as an example, the cloud server receives a data migration request for a target data item sent from a terminal device in the cloud network, and the cloud server obtains each attribute data of the target object to be stored, stores each attribute data in the cloud storage, obtains the storage location corresponding to the attribute data in the cloud storage, and writes the location indication information corresponding to the storage location of each attribute data to the corresponding data block in the target data node.
[0101] The structure of the data migration device of the embodiment of the present application is described in detail below. The data migration device can be implemented in various forms, such as a dedicated terminal with a data migration function, or a server with a data migration function, such as the preceding Figure 1 Server 200 in. Figure 2 The schematic diagram of the structure of the data migration device provided in the embodiment of the present application can be understood as follows: Figure 2 Only an exemplary structure of the data migration device is shown, not all structures, and can be implemented as needed. Figure 2 Partial or complete structure shown.
[0102] The data migration device provided in the embodiment of the present application includes: at least one processor 201, a memory 202, a user interface 203 and at least one network interface 204. The various components in the data migration device 20 are coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 205 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 205 .
[0103] The user interface 203 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0104] It is understood that the memory 202 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The memory 202 in the embodiment of the present application can store data to support the operation of the terminal (such as 10-1). Examples of these data include: any computer program for operating on the terminal (such as 10-1), such as an operating system and an application. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application can include various applications.
[0105] In some embodiments, the data migration device provided in the embodiments of the present application can be implemented in a combination of software and hardware. As an example, the data migration device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data migration method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0106] As an example of a data migration device provided in an embodiment of the present application being implemented by a combination of software and hardware, the data migration device provided in an embodiment of the present application can be directly embodied as a combination of software modules executed by a processor 201. The software module can be located in a storage medium, and the storage medium is located in the memory 202. The processor 201 reads the executable instructions included in the software module in the memory 202, and completes the data migration method provided in an embodiment of the present application in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
[0107] As an example, the processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0108] As an example of hardware implementation of the data migration device provided in the embodiment of the present application, the device provided in the embodiment of the present application can be directly executed by a processor 201 in the form of a hardware decoding processor, for example, one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components to implement the data migration method provided in the embodiment of the present application.
[0109] The memory 202 in the embodiment of the present application is used to store various types of data to support the operation of the data migration device 20. Examples of such data include: any executable instructions for operating on the data migration device 20, such as executable instructions, and the program for implementing the slave data migration method in the embodiment of the present application may be included in the executable instructions.
[0110] In other embodiments, the data migration device provided in the embodiments of the present application may be implemented in software. Figure 2 The data migration device stored in the memory 202 is shown, which may be software in the form of a program and a plug-in, and includes a series of modules. As an example of a program stored in the memory 202, a data migration device may be included, and the data migration device includes the following software modules: an information transmission module 2081 and a data migration module 2082. When the software modules in the data migration device are read into the RAM by the processor 201 and executed, the data migration method provided in the embodiment of the present application will be implemented. The functions of each software module in the data migration device will be described below, specifically including:
[0111] The information transmission module 2081 is used to receive a data migration request through an access node of the database;
[0112] The data migration module 2082 is used to obtain the engine file that needs to be migrated in the source storage node of the database in response to the data migration request;
[0113] The data migration module 2082 is used to adjust the state of the access node in response to the data migration request;
[0114] The data migration module 2082 is used to perform full data migration of the engine files from the source storage node to the destination storage node of the database;
[0115] The data migration module 2082 is used to obtain the newly added data generated by the database during the full data migration;
[0116] The data migration module 2082 is used to perform incremental data migration of newly added data from the source storage node to the destination storage node of the database.
[0117] In the above scheme,
[0118] The data migration module 2082 is used to adjust the access node from the normal state to the waiting state when receiving the data migration request;
[0119] The data migration module 2082 is used to adjust the access node from the waiting state to the data migration state when the full data migration starts;
[0120] The data migration module 2082 is used to adjust the access node from the data migration state to the request cache state when the incremental data migration is completed.
[0121] In the above scheme,
[0122] The data migration module 2082 is used for forwarding the received data processing request to the source storage node when the access node is in the data migration state;
[0123] The data migration module 2082 is used for caching the received data processing request by the access node when the access node is in the request caching state;
[0124] The data migration module 2082 is used for the access node to send the cached data processing request to the destination storage node when the incremental data migration is completed.
[0125] In the above scheme,
[0126] The data migration module 2082 is used for the slave node of the source storage node to establish a first transmission control protocol connection with the master node of the destination storage node;
[0127] The data migration module 2082 is used for establishing a second transmission control protocol connection between a slave node of the source storage node and a slave node of the destination storage node;
[0128] The data migration module 2082 is used to slice the engine file to obtain at least two slice engine files;
[0129] The data migration module 2082 is used to send the sharding engine file to the destination storage node in parallel through the first transmission control protocol connection and the second transmission control protocol connection;
[0130] The data migration module 2082 is used to resend the sharding engine file when receiving a retry request for the sharding engine file.
[0131] In the above scheme,
[0132] Data migration module 2082, used to configure cyclic redundancy check code for sharding engine files;
[0133] The data migration module 2082 is used to verify the cyclic redundancy check code after the sharding engine files are sent to the destination storage node in parallel, and obtain the verification result of the cyclic redundancy check code;
[0134] The data migration module 2082 is used to trigger incremental data migration when the verification result of the cyclic redundancy check code is successful;
[0135] The data migration module 2082 is used to resend the sharding engine file when the verification result of the cyclic redundancy check code fails.
[0136] In the above scheme,
[0137] The data migration module 2082 is used to generate a logical log according to the newly added data through the master node of the source storage node;
[0138] The data migration module 2082 is used to send the logical log to the master node of the destination storage node through the master node of the source storage node;
[0139] The data migration module 2082 is used to parse the logical log through the master node of the destination storage node to obtain the newly added data;
[0140] The data migration module 2082 is used to send the logical log to the slave node of the destination storage node through the master node of the destination storage node;
[0141] The data migration module 2082 is used to parse the logical log through the slave node of the destination storage node to obtain the newly added data.
[0142] In the above scheme,
[0143] The data migration module 2082 is used to detect the source of the target game when the data migration request is used to migrate the game data;
[0144] The data migration module 2082 is used to trigger the manual verification process when the source of the target game fails to pass the development component detection of the mini-game program;
[0145] The data migration module 2082 is used to detect the target game through a manual verification process to obtain the control logic and control elements of the target game;
[0146] The data migration module 2082 is used to extract data from the control logic and control elements of the target game to obtain the first engine file that needs data migration.
[0147] In the above scheme,
[0148] The data migration module 2082 is used to present the virtual character in the display interface of the mini-game program when the control component in the mini-game program is triggered;
[0149] The data migration module 2082 is used to obtain the running data of the mini-game program according to the status of the virtual character;
[0150] The data migration module 2082 is used to record the target object operation data of the mini-game program according to the running data of the mini-game program;
[0151] The data migration module 2082 is used to extract the running data of the mini-game program and the target object operation data to the second engine file that needs data migration.
[0152] In the above scheme,
[0153] The data migration module 2082 is used to determine the cloud server network corresponding to the database according to the identification information of the data in the database;
[0154] The data migration module 2082 is used to store the data migration results of the database in the cloud server network;
[0155] The data migration module 2082 is used to send the data migration result to the database through the cloud server network when data loss occurs in the database.
[0156] The present application also provides an electronic device, the electronic device comprising:
[0157] A memory for storing executable instructions;
[0158] The processor is used to implement the preceding data migration method when running the executable instructions stored in the memory.
[0159] An embodiment of the present application also provides a computer-readable storage medium storing executable instructions, which can implement the preceding data migration method when executed by a processor.
[0160] according to Figure 2The electronic device shown, in one aspect of the present application, the present application also provides a computer program product or a computer program, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the different embodiments and combinations of embodiments provided in various optional implementations of the data migration method provided in the present application.
[0161] Combination Figure 2 The data migration device shown in the figure illustrates the data migration method provided by the embodiment of the present application, see Figure 3 , Figure 3 This is an optional flow chart of the data migration method provided in the embodiment of the present application. It can be understood that: Figure 3 The steps shown can be executed by various electronic devices running the data migration device, for example, a dedicated data storage terminal, a server or a server cluster with a data migration device, wherein the dedicated data storage terminal with the data migration device can be the preceding sequence Figure 2 The electronic device with a data migration device in the embodiment shown in the figure is as follows. Figure 3 The steps shown are explained.
[0162] Step 301: The data migration device receives a data migration request through an access node of a database.
[0163] Among them, reference Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a data migration process in an embodiment of the present invention. Figure 4 As shown, the database system includes: a client, a database access node, and a database storage node, wherein the database storage node includes: a source storage node and a destination storage node. The physical data migration to be implemented in this application is to transfer the engine file from the source storage node to the destination storage node. The migration process does not affect the external service of the database, and ensures that the incremental records are synchronized. Taking the data migration in the game program server as an example, Figure 4 The client shown can be a game server integrated database client, which accesses the database through the client to implement the operation of the game program and save the game data in the source storage node. Figure 4 When applied to distributed databases, Figure 4 The access node shown is an access node of a distributed database, which can distribute client requests to corresponding storage nodes; Figure 4 The storage nodes shown are source storage nodes and destination storage nodes of a distributed database, and data can be dispersedly stored in multiple data storage nodes that are connected to the network.
[0164] Step 302: In response to the data migration request, the data migration device obtains the engine file that needs to be migrated from the source storage node of the database.
[0165] The data migration method provided in this application is implemented based on a data storage engine. The data storage engine provided in this application is a component that provides high-performance reading and writing of kv data structures. It can be embedded in other database servers to provide services for reading and writing kv data from disks. Figure 5 , Figure 5 This is a structural diagram of the data storage engine in an embodiment of the present invention, wherein the reading and writing of database records are performed through the database engine included in the data storage engine. The data storage engine provides the most basic read and write interface for reading and writing key-value (kv, key value) types, and the database records are stored in the engine file.
[0166] In some embodiments of the present invention, reference Figure 6 , Figure 6 FIG. 1 is a schematic diagram of structural information of a data storage engine in an embodiment of the present invention, wherein Figure 6 As shown, the data storage engine in this application processes data in two standards: one is the data writing standard, and the other is the data sorting standard. Specifically, the data writing operation standard of the data storage engine is determined according to the use requirements of the database, wherein the data writing operation standard is: writing data in log-type information and prohibiting data deletion; thus, all write operations of the data storage engine only append data without modifying the original data, and the purpose of this is to ensure the maximum degree of sequential IO and improve the IO throughput of the storage engine. This can greatly reduce the workload of the CPU in I / O operations, allowing the CPU to work more efficiently.
[0167] Step 303: The data migration device adjusts the state of the access node in response to the data migration request.
[0168] In some embodiments of the present invention, in response to a data migration request, adjusting the state of an access node may be implemented in the following manner:
[0169] When a data migration request is received, the access node is adjusted from the normal state to the waiting state; when the full data migration begins, the access node is adjusted from the waiting state to the data migration state; when the incremental data migration is completed, the access node is adjusted from the data migration state to the request cache state. Figure 4The database system structure shown, the access node of the database in this application can have four states, namely: normal state, waiting state, data migration state and request cache state, which are explained in turn below. Among them, when the access node is in the data migration state, the access node forwards the received data processing request to the source storage node; when the access node is in the request cache state, the access node caches the received data processing request; when the incremental data migration is completed, the access node sends the cached data processing request to the destination storage node. By detecting the state of the access node in real time, the working state of the source storage node and the destination storage node during the data migration process can be accurately known. When it is necessary to stop data migration, it is only necessary to control the state of the access node to flexibly control the data migration state.
[0170] Figure 7 The schematic diagram of the process of access node state conversion in an embodiment of the present invention specifically includes: 1) Normal state of access node: the client requests to access the corresponding source storage node. When data migration starts, the access node changes from the normal state to the waiting state. During the waiting state, the source storage node and the destination storage node of the database will process the preparation task of data migration.
[0171] 2) Waiting state of the access node: In this state, the access node prepares for the start of data migration. After the data migration preparation is completed, the access node changes from the waiting state to the data migration state. In the data migration state, data migration begins. In this state, the access node forwards all client requests to the source end of the data migration. If the migration fails, the access node changes from the data migration state to the normal state.
[0172] 3) Data migration state of access node: In this state, data migration is performed, and the client request is processed in the source storage node of the data migration. After the data migration is completed, the access node switches from the data migration state to the request cache state. In the request cache state, the client's request is cached and the client's request is not forwarded until the routing switch is completed.
[0173] 4) Access node request cache state: In preparation for switching the routing state, the access node caches the client's requests, and then switches the data processing requests received by the client from the source storage node to the destination storage node. After the routing switch is completed, the access node switches from the request cache state to the normal state. The access node forwards the cached client requests to the migration destination, and the subsequent data processing requests received by the client will also be forwarded to the destination storage node, thus completing the data migration.
[0174] In the process of implementing data migration of a distributed database through the data migration method provided by the present application, in order to ensure the integrity of the data migration and at the same time ensure that the new data generated during the data migration process can be accurately migrated from the source storage node to the destination storage node, the data migration method provided by the present application includes full data migration and incremental data migration. The processes of full data migration and incremental data migration are explained respectively below.
[0175] Step 304: The data migration device performs full data migration of the engine file from the source storage node to the destination storage node of the database.
[0176] refer to Figure 8 , Figure 8 The schematic diagram of the process of full data migration in an embodiment of the present invention is shown in the figure. Taking the database TcaplusDB as an example, the TcaplusDB storage node adopts a master-slave architecture and is divided into a master (master node) and a slave (slave node). The master node provides services to the outside world. When data is written, deleted, and modified, it reaches the slave node through the logical log. The slave node is a standby node. When the master node fails, the slave node replaces the original master node to provide services to the outside world.
[0177] When the data migration method provided by the present application is applied to a distributed database system, the master (master node) and the slave (slave node) can be located in the container cluster management system Kubernetes, which can be called K8S. It is an open source container operation platform that can realize functions such as combining several containers into a service and dynamically allocating the host where the container runs, providing great convenience for users to use containers. Through Kubernetes, applications can be quickly deployed, applications can be quickly expanded, new application functions can be seamlessly connected, and the use of hardware resources can be optimized.
[0178] Nodes are the basic elements of a container cluster. Depending on the business, nodes can be either virtual machines or physical machines. Each node contains the basic components required to run a container group Pod, including Kubelet (container management component), Kubeproxy (network proxy component), etc.
[0179] The Master node (main node) refers to the cluster control node, which manages and controls the entire cluster. All control commands of k8s are sent to it, and it is responsible for the specific execution process. The kube-apiserver (resource access component), kube-controller-mansger (operation management controller component) and kube-scheduler (scheduling component) running on the Master node maintain the healthy working state of the entire cluster by constantly communicating with the kubelet and kube-proxy on the working node (Node). If the service of the Master node cannot access a Node, the Node will be marked as unavailable and no new Pods (container groups) will be scheduled to it. However, additional detection is required for the Master itself to prevent the Master from becoming a single point of failure in the cluster, so the Master service also needs to be deployed with high availability.
[0180] Nodes other than the Master are called Nodes or Worker nodes. You can use the node view command (kubectl get nodes) in the Master to view the Node nodes in the cluster. Each Node node will be assigned some workload (Docker container) by the Master node. When a Node goes down, the workload on the node will be automatically transferred to other nodes by the Master node.
[0181] Pod (container group): The smallest / simplest basic unit created or deployed by Kubernetes - a container group. A Pod represents a microservice process running on the cluster, and a microservice process encapsulates an edge container that provides a microservice application (there can also be multiple edge containers), storage resources, an independent network IP, and policy options for managing and controlling how the container runs.
[0182] like Figure 8 As shown, in some embodiments of the present invention, full data migration of engine files from a source storage node to a destination storage node of a database can be achieved in the following ways:
[0183] The slave node of the source storage node establishes a first transmission control protocol connection with the master node of the destination storage node; the slave node of the source storage node establishes a second transmission control protocol connection with the slave node of the destination storage node; the engine file is sharded to obtain at least two sharded engine files; the sharded engine file is sent to the destination storage node in parallel through the first transmission control protocol connection and the second transmission control protocol connection; when a retry request for the sharded engine file is received, the sharded engine file is resent. Among them, in order to improve the efficiency of data migration, the engine file is first sharded. Taking the distributed database system TcaplusDB as an example, the sharding processing of the engine file can provide a higher specification of concurrent request capability for the data migration of the engine file. If the user sets the sharding field, TcaplusDB will automatically adjust the table sharding by calculating the hash of the sharding field according to the current data access situation. If the user does not set it, the system will use the primary key field as the sharding field by default. The configuration of the sharding field refers to Table 1:
[0184] Table 1
[0185]
[0186]
[0187] The setting of shard fields is related to the background data distribution. Users need to evaluate whether the field values used as shard fields are discrete. Fields with limited values, such as gender and week, are not recommended to be set as shard fields. It is recommended to use fields such as ID and name as shard fields.
[0188] In some embodiments of the present invention, in order to ensure the accuracy of data migration during the full data migration process, a cyclic redundancy check code can be configured for the sharding engine file; after the sharding engine file is sent to the destination storage node in parallel, the cyclic redundancy check code is checked to obtain the verification result of the cyclic redundancy check code; when the verification result of the cyclic redundancy check code is successful, the incremental data migration is triggered; when the verification result of the cyclic redundancy check code fails, it indicates that the sharding engine file is damaged during the data migration, and therefore, the sharding engine file needs to be resent. In this way, the integrity of the engine file received by the destination storage node during the data migration process can be guaranteed. For example, when migrating game data, the cyclic redundancy check code can be used to ensure that the game data is completely migrated to the new server, and the user's game control will not be affected due to data loss during data migration.
[0189] In some embodiments of the present invention, since different network bandwidths affect the migration speed of data during data migration, the data migration method provided by the present application needs to support speed adaptation to achieve adaptation to different network environments. Specifically, when the sharding engine file is sent concurrently through different TCP connections, it can be controlled by a sliding window. When the migration destination storage node receives the sharding engine file, it will reply with a response message. Each response message carries the load information of the destination storage node. When the load of the destination storage node exceeds the load threshold, it means that the current data migration speed is not suitable for the current network environment, and the source storage node needs to adjust the sending window size to control the parallel sending speed of the sharding engine file.
[0190] Through step 304, the full data migration in the data migration process is completed. When performing the full data migration, the access node can still receive the data processing instructions issued by the user without stopping, so incremental data will be generated. In order to ensure the integrity and accuracy of the data of the destination storage node after the data migration, it is necessary to send the incremental data to the destination database through steps 305 and 306.
[0191] Step 305: The data migration device obtains the newly added data generated by the database during the full data migration.
[0192] Step 306: The data migration device performs incremental data migration on the newly added data from the source storage node to the destination storage node of the database.
[0193] refer to Fig. 9 , Fig. 9 This is a schematic diagram of the incremental data migration process in an embodiment of the present invention, wherein the incremental data migration is initiated by the master node of the source storage node, and the newly added record data generated in the process of full data migration is synchronized from the master node of the source storage node to the master node of the destination source storage node. After the master node of the destination storage node writes the incremental data, it will be synchronized to the slave node of the destination storage node by means of a logical log. In the MySQL database system, in order to achieve data synchronization between database systems, it is necessary to generate an additional logical log, called a binlog log (logical log). At the same time, for the MySQL database system, it also needs a physical log, called a REDO log, to ensure the transaction persistence of the MySQL database system. Fig. 9 As shown, the new data generated during the migration process is synchronized by means of logical logs, so that the data of the source storage node and the destination storage node are consistent. The beneficial technical effect of using logical logs is that the records of logical logs in master-slave synchronization can be reused, and there is no need to store new data generated during data migration, thus saving hardware resources consumed during data migration.
[0194] In some embodiments of the present invention, taking the database Tcaplus DB as an example, the database Tcaplus DB can support different APP services of game operators (client games) and social product operators. The characteristics of social applications are that users can create data freely, comment and message functions are frequently used, user data content is aggregated by topic, the length of fields such as text, links, time records, etc. is stable, data activity is distributed by time, and there are more reads and fewer writes. There are also requirements for high throughput and high concurrency for data storage services, and client games have the characteristics of long online time of players and large amount of data, and most of them adopt the full-region and full-server model. The game business life cycle is long and there are many operational activities. The data storage service is required to be stable, low-latency, and high-throughput, and data backup and rollback also need processing speed requirements. Therefore, during the data migration process, it is necessary to provide uninterrupted data services for game users, refer to Fig.10 , Fig.10 This is a schematic diagram of storage engine switching in an embodiment of the present invention. When the data migration method of the present application is executed, because it is necessary to provide uninterrupted data services to game users, two storage engines can be mainly used as switches in the storage layer of the data storage node. Before data migration, a temporary storage engine file is created in advance, and the write data generated by the client write request generated during the data migration process is stored in the temporary storage engine, and the original storage engine file provides read services to the outside, and the client read request reads data in the original storage engine.
[0195] After the data migration is completed, the data written into the temporary storage engine file during the migration process needs to be merged. During this process, the temporary storage engine provides read services to the outside. Therefore, through the data migration method provided by this application, the database does not need to stop service during the data migration process, and the user service is not affected during the data migration, thereby ensuring the maximum database availability and enabling users to obtain a better database usage experience.
[0196] When the database completes data migration, the cloud server network corresponding to the database can be determined based on the identification information of the database data; the database data migration results are saved in the cloud server network; when data loss occurs in the database, the data migration results are sent to the database through the cloud server network, thereby enhancing the data security of the database and avoiding user losses caused by database data loss.
[0197] The database may be a cloud server or a cloud server cluster. The embodiments of the present application may be implemented in combination with cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize data calculation, storage, processing, and sharing. It can also be understood as a general term for network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business model applications. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites, so cloud technology needs to be supported by cloud computing.
[0198] It should be noted that cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called the "cloud". From the user's point of view, the resources in the "cloud" can be infinitely expanded, and can be obtained at any time, used on demand, expanded at any time, and paid for by use. As a basic capability provider for cloud computing, a cloud computing resource pool platform will be established, referred to as a cloud platform, generally referred to as Infrastructure as a Service (IaaS), and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (which can be virtualized machines, including operating systems), storage devices and network devices.
[0199] Combined with the previous sequence Figure 1 As shown, the data migration method provided in the embodiment of the present invention can be implemented by corresponding cloud devices, for example: the terminal (including the terminal 10-1 and the terminal 10-2) is connected to the server 200 located in the cloud through the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two. It is worth noting that the server 200 can be a physical device or a virtualized device.
[0200] The following is a further explanation of the data migration method provided by this application in combination with different implementation scenarios. With the explosive growth of game data, traditional relational databases are increasingly unable to meet the requirements of high concurrent reading and writing, efficient storage and access of massive data, high scalability and high availability. NoSQL databases have developed very rapidly due to their advantages such as simple expansion and fast reading and writing. Fig.11 , Fig.11This is a schematic diagram of the database architecture in this application. The database table is stored in the game database. Optionally, the game database includes TcaplusDB. The data storage protocols supported by the database table in TcaplusDB include the tdr protocol and the Protocol Buffers (pb) protocol. Due to the fragmentation of game time, there are many interactions between players, the amount of data is large, and both full-area and full-server and zone-based servers are very common. The game is developing and changing rapidly, and there are many operational activities. The data storage layer has high requirements for low latency. Therefore, the read requests, write requests, and delete requests in the database are not only large in number, but also instantaneous. Therefore, it is necessary not only to reduce memory fragmentation and memory overhead, but also to ensure the security and accuracy of data without occupying the hardware overhead of the database, thereby reducing the user's usage cost. Fig.11 In the structure shown, a TcaplusDB record consists of a line of strings. Each field supports nested types, with a maximum of 32 levels of nesting. The maximum size of a single record is 10MB, and commonly used object files can be serialized into binary files for storage. Fig.11 When the capacity of the source storage node in the database architecture shown is insufficient, the server needs to be expanded to migrate the game data stored in the source storage node to a new server. At this time, the new server can be the destination storage node.
[0201] See also Fig.12 , Fig.12 The process diagram of the data migration method provided in this application specifically includes the following steps:
[0202] Step 1201: In response to a data migration request, a first engine file and a second engine file that require data migration are obtained in a source storage node of a database.
[0203] Among them, when the user of the game program does not generate operation data, the engine file that needs to be migrated is the first engine file. Specifically, when the data migration request is used to migrate game data, the source of the target game is detected; when the source of the target game fails to pass the development component detection of the mini-game program, the manual verification process is triggered; through the manual verification process, the target game is detected to obtain the control logic and control elements of the target game; the control logic and control elements of the target game are extracted to obtain the first engine file that needs to be migrated. Among them, Fig.12 The first engine file to be migrated is referenced in Table 2.
[0204] Table 2
[0205]
[0206] Fig.13 This is an optional structural diagram of the first engine file of the game in the embodiment of the present application, wherein the execution Fig.13 The logic of the first engine file shown is to traverse the entire tree from the root node, the parent node executes the child node, and the child node returns the result to the parent node after execution. Then the parent node decides what to do next based on the result of the child node. Fig.13 In the example, the parent node is a behavior selection node; the leaf node of the parent node is action 1; the child node of the parent node is a sequential execution child node; the leaf node of the child node includes node conditions and action 2. In actual applications, the first engine file is input from the root node, and then executes its sequential execution child node through the parent node. When each leaf node (node condition and action 2) of the sequential execution child node is successfully executed, the sequential execution child node returns a flag that the parent node is successfully executed; when any leaf node (node condition and action 2) in the sequential execution child node fails to execute, the sequential execution child node returns a flag that the parent node fails to execute, and the parent node executes its leaf node, i.e., action 1. If it is assumed that action 1 is sleeping, action 2 is greeting, and the node condition is encountering a game player. Migrating the first engine file can ensure that the processing logic of the game program after data migration remains unchanged, and ensure that game users get the same experience as before data migration.
[0207] In some embodiments of the present invention, as the number of game players and operation data increases, when the game database needs to be expanded, the data generated during the game operation needs to be migrated. When the control component in the mini-game program is triggered, a virtual character is presented in the display interface of the mini-game program;
[0208] According to the status of the virtual character, the running data of the mini-game program is obtained; according to the running data of the mini-game program, the target object operation data of the mini-game program is recorded; the running data and the target object operation data of the mini-game program are extracted to the second engine file that needs to be migrated. Therefore, during the data migration process, the running data and the target object operation data of the mini-game program can be completely migrated to the destination storage node. After the data migration, it can be ensured that the game users get the same experience as before the data migration. Among them, Fig.12 The second engine files to be migrated refer to Table 3.
[0209] Table 3
[0210]
[0211]
[0212] Step 1202: adjust the state of the access node and perform full data migration of the engine file from the source storage node to the destination storage node of the database.
[0213] Step 1203: Receive a data processing request sent by a game user, and obtain new data generated by the database during full data migration.
[0214] Step 1204: incrementally migrate the newly added data from the source storage node to the destination storage node of the database, and receive the data processing request sent by the user through the destination storage node.
[0215] Beneficial technical effects:
[0216] 1) The present application receives a data migration request through the access node of the database; in response to the data migration request, obtains the engine file that needs to be migrated in the source storage node of the database; in response to the data migration request, adjusts the state of the access node; performs full data migration of the engine file from the source storage node to the destination storage node of the database; obtains the new data generated by the database during the full data migration; performs incremental data migration of the new data from the source storage node to the destination storage node of the database. In this way, the data migration of the engine files in the database can be automated, and the consistency of the migrated data can be guaranteed during the data migration process, reducing the data loss caused by tedious manual data synchronization, and ensuring the security and accuracy of the data.
[0217] 2) Since both full data migration and incremental data migration are used during the data migration process, it can be ensured that there is no need to stop the service during the data migration process, ensuring that users are provided with normal database data addition, data deletion, data modification and data query services, and ensuring the continuity of users' use of the database.
[0218] 3) By real-time detection of the status of the access node, the working status of the source storage node and the destination storage node during the data migration process can be accurately known. When it is necessary to stop the data migration, it is only necessary to control the status of the access node to flexibly control the data migration status.
[0219] The above are only embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data migration method, characterized in that: The method comprises: receiving a data migration request through an access node of the database; In response to the data migration request, acquiring an engine file requiring data migration in a source storage node of the database; In response to the data migration request, adjusting the state of the access node; Performing full data migration of the engine file from the source storage node to the destination storage node of the database; Obtaining new data generated by the database in the full data migration; Incrementally migrate the newly added data from the source storage node to the destination storage node of the database.
2. The method according to claim 1, characterized in that The step of adjusting the state of the access node in response to the data migration request includes: When receiving the data migration request, adjusting the access node from a normal state to a waiting state; When the full data migration starts, adjusting the access node from the waiting state to the data migration state; When the incremental data migration is completed, the access node is adjusted from the data migration state to the request cache state.
3. The method according to claim 2, characterized in that The method further comprises: When the access node is in a data migration state, the access node forwards the received data processing request to the source storage node; When the access node is in a request cache state, the access node caches the received data processing request; When the incremental data migration is completed, the access node sends the cached data processing request to the destination storage node.
4. The method according to claim 1, characterized in that: The step of performing full data migration of the engine file from the source storage node to the destination storage node of the database includes: The slave node of the source storage node establishes a first transmission control protocol connection with the master node of the destination storage node; The slave node of the source storage node establishes a second transmission control protocol connection with the slave node of the destination storage node; Slice the engine file to obtain at least two segments of the engine file; Sending the sharding engine file to the destination storage node in parallel via the first transmission control protocol connection and the second transmission control protocol connection; When a retry request for the slice engine file is received, the slice engine file is resent.
5. The method according to claim 4, characterized in that The method further comprises: Configuring a cyclic redundancy check code for the sharding engine file; After the sharding engine files are sent to the destination storage node in parallel, the cyclic redundancy check code is checked to obtain a check result of the cyclic redundancy check code; When the verification result of the cyclic redundancy check code is successful, triggering the incremental data migration; When the verification result of the cyclic redundancy check code fails, the slice engine file is resent.
6. The method according to claim 1, characterized in that The incremental data migration of the newly added data from the source storage node to the destination storage node of the database includes: The master node of the source storage node generates a logical log according to the newly added data; The master node of the source storage node sends the logical log to the master node of the destination storage node; The master node of the destination storage node parses the logical log to obtain the newly added data; The master node of the destination storage node sends the logical log to the slave node of the destination storage node; The slave node of the destination storage node parses the logical log to obtain the newly added data.
7. The method according to claim 1, characterized in that The method further comprises: When a data migration request is used to migrate game data, the source of the target game is detected; When the source of the target game fails to pass the detection of the development component of the mini-game program, a manual verification process is triggered; Through the manual verification process, the target game is detected to obtain the control logic and control elements of the target game; Data is extracted from the control logic and control elements of the target game to obtain a first engine file that requires data migration.
8. The method according to claim 7, characterized in that The method further comprises: When the control component in the mini-game program is triggered, a virtual character is presented in the display interface of the mini-game program; According to the state of the virtual character, obtaining the running data of the mini-game program; According to the running data of the mini-game program, recording the target object operation data of the mini-game program; The running data of the mini-game program and the target object operation data are extracted to a second engine file that needs data migration.
9. The method according to claim 1, characterized in that: The method further comprises: Determining a cloud server network corresponding to the database according to identification information of the data in the database; The data migration result of the database is stored in the cloud server network; When data loss occurs in the database, the data migration result is sent to the database through the cloud server network.
10. A data migration device, characterized in that: The device comprises: An information transmission module, used for receiving a data migration request through an access node of a database; A data migration module, configured to obtain, in response to the data migration request, an engine file for which data migration is required in a source storage node of the database; The data migration module is used to adjust the state of the access node in response to the data migration request; The data migration module is used to perform full data migration of the engine file from the source storage node to the destination storage node of the database; The data migration module is used to obtain the newly added data generated by the database in the full data migration; The data migration module is used to perform incremental data migration of the newly added data from the source storage node to the destination storage node of the database.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor, configured to implement the data migration method according to any one of claims 1 to 9 when running the executable instructions stored in the memory.
12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the data migration method described in any one of claims 1 to 9 is implemented.
13. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by a processor, the data migration method described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Data migration method and device
CN106874389A
Data migration method and device, computer equipment and storage medium
CN113342783A
Cited By
Incremental data verification method and device, equipment, medium and program product
CN119441217A
Relational database table synchronization method and terminal equipment
CN119691081A
Relational database table synchronization method and terminal device
CN119691081B
Method, system, device and equipment for data transmission among multiple sites and medium
CN120560573A
