Data migration method and system for distributed database, and electronic device

By generating data migration tasks in a distributed database and creating a serverless background job pool, the problem of limited computing node resources is solved, achieving more efficient user request processing and resource conservation.

WO2025253188A1PCT designated stage Publication Date: 2025-12-11CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/052473
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-05
Filing Date
2025-03-07
Publication Date
2025-12-11

AI Technical Summary

Technical Problem

In distributed databases, computing node resources are limited, which makes it difficult to effectively handle user query requests when performing data migration tasks. This is especially true when a tiered storage strategy is adopted, where computing node resources are consumed in large quantities, making it impossible to efficiently process user requests.

Method used

Generate data migration tasks and request the creation of a serverless background job pool. Independent of the compute nodes, the data migration tasks are executed through the serverless background job pool, reducing the resource consumption of the compute nodes and allowing them to focus on processing user requests.

Benefits of technology

By using a serverless background job pool to handle data migration tasks, compute nodes can focus more on processing user requests, adapt to task changes, and save resource costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025052473_11122025_PF_FP_ABST
    Figure IB2025052473_11122025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of data processing, and provides a data migration method and system for a distributed database, and an electronic device. The data migration method comprises: for target data in a first storage node, generating at least one data migration task, the data migration task being used for instructing to migrate corresponding data from the first storage node to a second storage node; requesting to create a serverless background task pool, the serverless background task pool being used for executing the at least one data migration task, and the serverless background task pool being independent of a computing node; and adding the at least one data migration task to the serverless background task pool.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The cross-references of the data migration method and system of the distributed database and the electronic equipment The present disclosure claims the priority of the Chinese patent publication No. 202410725990.9, published on June 5, 2024, and entitled "Data migration method and system of distributed database and electronic equipment", the whole content of which is incorporated herein by reference. TECHNICAL FIELD The present disclosure relates to the technical field of data processing, and particularly relates to a data migration method and system of distributed database and electronic equipment. BACKGROUND In the distributed database, the computing node plays a crucial role, which is configured to perform database operations and process query requests, etc., such as performing a data migration task of migrating one storage node in the distributed database to another data in the distributed database. However, the computing node has limited resources, and in the case that the computing node needs to consume a large amount of resources to perform the data migration task, the computing node often cannot better execute the user request such as the data query request initiated by the user. Therefore, how to enable the computing node to better process the user request has become a technical problem to be solved by the relevant technical personnel. The present disclosure provides a data migration method and system of distributed database and electronic equipment to solve one or more technical problems. In a first aspect, the present disclosure provides a first data migration method of distributed database, the distributed database comprising a computing node, a first storage node and a second storage node, the method comprising: generating at least one data migration task for target data in the first storage node, wherein the data migration task is used to indicate the migration of the corresponding data from the first storage node to the second storage node; requesting to create a serverless background job pool, wherein the serverless background job pool is used to execute at least one data migration task, and the serverless background job pool is independent of the computing node; and adding at least one data migration task to the serverless background job pool.In a second aspect, the embodiments of the present disclosure provide a second data migration method of a distributed database, the distributed database comprising a computing node, a first storage node and a second storage node, the method comprising: in response to detecting that a data proportion corresponding to dirty data in the first storage node reaches a set threshold, determining the dirty data as target data; generating at least one data migration task for the target data, wherein the data migration task is used to instruct migration of corresponding data from the first storage node to the second storage node; requesting creation of a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and adding the at least one data migration task to the serverless background job pool. In a third aspect, the embodiments of the present disclosure provide a third data migration method of a distributed database, the distributed database comprising a computing node, a first storage node and a second storage node, the method comprising: in response to detecting that a data proportion corresponding to cold data in the first storage node reaches a set threshold, determining the cold data as target data; generating at least one data migration task for the target data, wherein the data migration task is used to instruct migration of corresponding data from the first storage node to the second storage node; requesting creation of a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and adding the at least one data migration task to the serverless background job pool. In a fourth aspect, the embodiments of the present disclosure provide a fourth data migration method of a distributed database, the distributed database comprising a computing node, a first storage node and a second storage node, the method being applied to a serverless background job pool created independently of the computing node, and comprising: receiving at least one data migration task sent by a task configuration node, wherein the at least one data migration task is generated for target data in the first storage node; and executing the at least one data migration task, wherein the data migration task is used to migrate the target data from the first storage node to the second storage node. In a fifth aspect, the embodiments of the present disclosure provide a data migration system of a distributed database, comprising: a task configuration node and a serverless background job pool; the task configuration node is configured to execute the first data migration method of the distributed database provided in the embodiments of the present disclosure; and the serverless background job pool is configured to execute the fourth data migration method of the distributed database provided in the embodiments of the present disclosure. In a sixth aspect, the embodiments of the present disclosure provide an electronic device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method provided in any of the embodiments of the present disclosure when executing the computer program.In a seventh aspect, the embodiments of the present disclosure provide a computer-readable storage medium, including a stored program, wherein the program controls a device where the computer-readable storage medium is located to execute the method provided by any of the embodiments of the present disclosure when the program is run by a processor. In an eighth aspect, the embodiments of the present disclosure provide a computer program product, wherein the computer program product includes a computer program, and the computer program implements the method provided by any of the embodiments of the present disclosure when the computer program is executed by a processor. In a ninth aspect, the embodiments of the present disclosure provide a computer program product, wherein the computer program product includes a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores a computer program, and the computer program implements the method provided by any of the embodiments of the present disclosure when the computer program is executed by a processor. In a tenth aspect, the embodiments of the present disclosure provide a computer program product, and the computer program product implements the method provided by any of the embodiments of the present disclosure when the computer program product is executed by a processor. Compared with the prior art, the technical solutions of the present disclosure have the following advantages: after the target data in the first storage node is used to generate at least one data migration task, the present disclosure requests to create a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node, then the at least one data migration task is added to the serverless background job pool, so that the corresponding data migration task is executed by the serverless background job pool. Wherein, the serverless background job pool independent of the computing node is requested to be created, and the data migration task is processed by the serverless background job pool independent of the computing node, so that the computing node can not consume resources to execute the data migration task, thereby enabling it to focus more on processing user requests to better complete the processing of user requests. In addition, the serverless background job pool can be elastically scaled according to the changes of the data migration task, when the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand, and vice versa, when the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the changes in the workload of the data migration task be better adapted, but also resource costs can be saved. The above summary is only for the purpose of the description and is not intended to limit in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present disclosure will be apparent from a study of the drawings and the following detailed description.It should be understood that the drawings only depict some embodiments according to the present disclosure and should not be considered as limiting the scope of the present disclosure. FIG. 1 shows a schematic diagram of an application scenario of a data migration method of a distributed database provided in an embodiment of the present disclosure; FIG. 2 shows a flowchart of a first data migration method of a distributed database provided in an embodiment of the present disclosure; FIG. 3 shows a flowchart of a second data migration method of a distributed database provided in an embodiment of the present disclosure; FIG. 4 shows a flowchart of a third data migration method of a distributed database provided in an embodiment of the present disclosure; FIG. 5 shows a flowchart of a fourth data migration method of a distributed database provided in an embodiment of the present disclosure; FIG. 6 shows a schematic diagram of a data migration system of a distributed database provided in an embodiment of the present disclosure; FIG. 7 shows a schematic diagram of a data migration apparatus of a distributed database provided in an embodiment of the present disclosure; FIG. 8 shows a schematic diagram of another data migration apparatus of a distributed database provided in an embodiment of the present disclosure; FIG. 9 shows a schematic diagram of still another data migration apparatus of a distributed database provided in an embodiment of the present disclosure; and FIG. 10 shows a block diagram of an electronic device used to implement an embodiment of the present disclosure. In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure. However, the present disclosure can be implemented in many different forms other than those described herein, and those skilled in the art can make similar generalizations without departing from the essence of the present disclosure, so the present disclosure is not limited to the specific implementation disclosed below. In order to facilitate understanding of the technical solutions of the embodiments of the present disclosure, the related technologies of the embodiments of the present disclosure are described below. The following related technologies can be combined with the technical solutions of the embodiments of the present disclosure in any manner as an optional solution, and all of them belong to the protection scope of the embodiments of the present disclosure. In a distributed database, the resources possessed by a computing node are limited, if the computing node needs to consume a large amount of resources to perform a data migration task, then the computing node often cannot better execute a user request such as a data query request initiated by a user. Therefore, how to enable the computing node to better handle the user request has become a technical problem to be solved by the relevant technical personnel. Especially for a distributed database using a tiered storage strategy, this technical problem is particularly prominent. Specifically, tiered storage is a strategy of storing data according to factors such as access frequency, access speed, and cost. When using the tiered storage strategy, data can be stored on storage nodes corresponding to different storage tiers according to the characteristics of the data, and generally, the types of storage nodes corresponding to different storage tiers are different. In an example, the distributed database can include the following several storage tiers.

[0002] 1、 Hot Tier: The hot tier is configured to store data that requires high access speed and is frequently accessed. The storage nodes corresponding to the hot tier can be of the following types: Cache, Memory, and Solid State Drive (SSD).

[0003] 2、 Warm Tier: The warm tier is configured to store data that requires relatively low access speed and has relatively low access frequency. The storage nodes corresponding to the warm tier can be of the following types: Hard Disk Drive (HDD) and cloud storage.

[0004] 3、 Cold Tier: The cold tier is configured to store data that is not frequently accessed for a long time, such as archive data or backup data. The storage node corresponding to the cold tier can be a simple storage service (S3) or the like. For a distributed database that adopts a tiered storage strategy, a large number of data migration tasks often need to be involved, such as dirty data flushing and cold data migration. For example, when the proportion of dirty data in the memory reaches a set threshold, the dirty data in the memory needs to be written to the disk or cloud storage. For another example, when the data stored in the hard disk drive has not been accessed for a long time, or when the data stored in the hard disk drive has a high probability of not being accessed for a long time, the cold data can be migrated from the solid state disk to the cloud storage. It should be noted that dirty data usually refers to data that has been modified but has not been persisted to the disk or main storage, and cold data usually refers to data that has not been accessed for a long time or has a high probability of not being accessed for a long time. Since the distributed database that adopts the tiered storage strategy often needs to involve a large number of data migration tasks, in this case, if the computing nodes in the distributed database are used to perform these data migration tasks, most of the resources possessed by the computing nodes will be consumed by these data migration tasks, at this time, the computing nodes often cannot better execute user-initiated data query requests and the like. Therefore, for the distributed database that adopts the tiered storage strategy, it is more necessary to solve the technical problem of how to enable the computing nodes to better handle user requests. In order to solve the technical problem of how to enable the computing nodes to better handle user requests, the embodiments of the present disclosure provide a data migration scheme of a distributed database. The scheme first generates at least one data migration task for target data in a first storage node of the distributed database, then requests to create a serverless background job pool for executing the at least one data migration task and independent of the computing nodes, and after the serverless background job pool is created, adds the at least one data migration task to the serverless background job pool. The data migration task is used to indicate that the corresponding data is migrated from the first storage node to a second storage node of the distributed database.The data migration scheme of the distributed database provided in the present disclosure can, after generating at least one data migration task for target data in a first storage node, request to create a serverless background job pool independent of the computing node for executing the at least one data migration task, and add the at least one data migration task to the serverless background job pool independent of the computing node, so as to execute the corresponding data migration task by the serverless background job pool independent of the computing node. Requesting to create the serverless background job pool independent of the computing node and processing the data migration task by the serverless background job pool independent of the computing node can enable the computing node to focus more on processing user requests, so as to better complete the processing of the user requests. In addition, the serverless background job pool can be elastically scaled according to the change of the data migration task, and when the number of the serverless background job pool increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand. Conversely, when the number of the data migration task decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the change of the workload of the data migration task be better adapted, but also the resource cost can be saved. It should be noted that the above scheme provided in the present disclosure can be executed in the computing node, that is, the computing node generates the data migration task, requests to create the serverless background job pool independent of the computing node, and adds the data migration task to the serverless background job pool. However, in order to further reduce the resources of the computing node consumed in the data migration process, so as to ensure that the computing node can focus more on processing user requests, thereby better completing the processing of the user requests, in actual application process, a task configuration node independent of the computing node is often pre-configured to execute the above scheme provided in the present disclosure. In the present disclosure, the computing node is a node in the distributed database configured to be responsible for executing database operations and processing query requests, and the storage node is a node in the distributed database configured to be responsible for storing data. The first storage node and the second storage node generally represent different storage nodes in the distributed storage, and do not refer to a specific storage node. For example, if the distributed storage system includes three storage nodes, storage node 1, storage node 2 and storage node 3, if it is necessary to migrate the cold data in the storage node 2 to the storage node 3, at this time, the first storage node represents the storage node 2, and the second storage node represents the storage node 3. For the distributed database adopting a hierarchical storage strategy, the first storage node and the second storage node belong to different types of storage nodes in the distributed database.For example, the storage hierarchy of a distributed database is divided into four layers from high to low: the first storage layer (the corresponding storage node type is memory), the second storage layer (the corresponding storage node type is a hard drive), the third storage layer (the corresponding storage node type is a cloud disk), and the fourth storage layer (the corresponding storage node type is S3). The first storage node generally refers to the storage node corresponding to the relatively higher storage layer, and the second storage node generally refers to the storage node corresponding to the relatively lower storage layer. A serverless background job pool (SBJP) refers to a background job pool running in a serverless computing environment. The serverless background job pool can be scaled elastically according to changes in data migration tasks, so when a request is created for the serverless background job pool, the resource conditions required for executing at least one data migration task can be determined first, and then a corresponding creation request is generated according to the resource conditions to request the creation of the serverless background job pool. In this way, the cloud service provider can be requested to create a serverless background job pool for executing at least one data migration task on demand. The resource conditions at least include the hardware and software resources required by the serverless background job pool, the time required for the serverless background job pool to run, and the like. In the present disclosure, the target data in the first storage node needs to be determined before at least one data migration task is generated for the target data in the first storage node. The target data refers to the data to be migrated in the first storage node. When the target data in the first storage node is determined, the data proportion of the specified data in the first storage node can be detected first, and when the data proportion reaches a set threshold, the specified data is determined as the target data. Specifically, the task configuration node can create a polling thread in advance, and use the polling thread to periodically query the data proportion of the specified data in the first storage node. When the polling thread queries the data proportion of the specified data in the first storage node, the task configuration node determines the specified data as the data to be migrated (i.e., the target data). It should be noted that in the present disclosure, the specified data generally refers to at least one of dirty data and cold data. In the present disclosure, after the task configuration node adds at least one data migration task to the serverless background job pool, the serverless background job pool executes at least one data migration task to migrate the target data from the first storage node to the second storage node.Specifically, the serverless background job pool repeatedly performs the following steps until at least one data migration task is executed: first, determine the currently existing unexecuted data migration tasks in the task queue, and then take out a target data migration task from the unexecuted data migration tasks and execute it. The serverless background job pool can execute at least one data migration task in turn, that is, read one data migration task as a target data migration task and execute it at a time. When there are multiple data migration tasks in the at least one data migration task, two or more data migration tasks can also be executed concurrently, that is, read two or more data migration tasks as target data migration tasks and execute them at a time. In the present disclosure, when the serverless background job pool completes the execution of the at least one data migration task, the resources occupied by the serverless background job pool are released. In order to more clearly show the distributed database data migration method provided in the present disclosure, first introduce an application example of the distributed database data migration method provided in the present disclosure. The distributed database data migration method provided in the present disclosure can be applied to dirty data flushing. As shown in FIG. 1, the distributed database adopting a hierarchical storage strategy includes four storage levels from high to low: a first storage level, a second storage level, a third storage level, and a fourth storage level. Among them, the type of the storage node corresponding to the first storage level is memory, the type of the storage node corresponding to the second storage level is a hard disk drive, the type of the storage node corresponding to the third storage level is a cloud disk, and the type of the storage node corresponding to the fourth storage level is S3. In this application example, the so-called dirty data flushing specifically refers to writing dirty data in the storage node corresponding to the high storage level into the storage node corresponding to the next level storage level. In this case, when the memory type storage node is used as the first storage node, the hard disk drive type storage node is the second storage node; when the hard disk drive type storage node is used as the first storage node, the cloud disk type storage node is the second storage node; when the cloud disk type storage node is used as the first storage node, the S3 type storage node is the second storage node. The polling thread in the task configuration node periodically queries the corresponding data occupancy ratio of dirty data in memory, hard disk drive, and cloud disk, and when the corresponding data occupancy ratio of dirty data in memory, hard disk drive, and cloud disk reaches a set threshold, the dirty data in memory, hard disk drive, and cloud disk are determined as target data (i.e., the data to be migrated in each storage node).For ease of distinction, the target data in the memory is recorded as target data a, the target data in the hard disk drive is recorded as target data b, and the target data in the cloud disk is recorded as target data c in the embodiments of the present disclosure. It should be noted that the data proportion corresponding to the dirty data in the memory, the hard disk drive and the cloud disk does not reach the set threshold, and the dirty data in the memory, the hard disk drive and the cloud disk is determined as the target data, but the data proportion corresponding to the dirty data in each storage node reaches the set threshold, that is, the dirty data in the storage node is determined as the target data. In the application example, the data migration scheme provided by the present disclosure is described by taking the data proportion corresponding to the dirty data in the memory, the hard disk drive and the cloud disk as an example. After determining the target data, the task configuration node generates at least one data migration task for the target data, wherein the data migration task is used to indicate that the corresponding data is migrated from the first storage node to the second storage node. Specifically, the task configuration node generates at least one data migration task A for the target data a, at least one data migration task B for the target data b, and at least one data migration task C for the target data c. Wherein, the at least one data migration task A is used to indicate that the dirty data in the memory is migrated to the hard disk drive, the at least one data migration task B is used to indicate that the dirty data in the hard disk drive is migrated to the cloud disk, and the at least one data migration task C is used to indicate that the dirty data in the cloud disk is migrated to S3. After generating the corresponding data migration task for the target data, the task configuration node further calculates the resource condition required for executing the at least one data migration task, and generates a corresponding creation request for the resource condition, wherein the creation request is used to request the cloud server provider to create a serverless background job pool. After the serverless background job pool is created, the task configuration node adds the corresponding data migration task generated for the target data to the serverless background job pool. In actual application, the at least one data migration task can be added to the task queue created in advance in the serverless background job pool. After receiving the at least one data migration task, the serverless background job pool executes the at least one data migration task to migrate the target data from the first storage node to the second storage node.Specifically, the serverless background job pool executes at least one data migration task A to migrate dirty data in the memory to the hard drive; the serverless background job pool executes at least one data migration task B to migrate dirty data in the hard drive to the cloud disk; and the serverless background job pool executes at least one data migration task C to migrate dirty data in the cloud disk to the S3. During execution of the at least one data migration task, the serverless background job pool repeatedly performs the following steps until the at least one data migration task is executed completely: first, determining currently existing unexecuted data migration tasks in the task queue, and then taking a target data migration task from the unexecuted data migration tasks and executing the target data migration task. In the case that the at least one data migration task is executed completely, the serverless background job pool releases resources occupied by the at least one data migration task in the serverless background job pool. The data migration scheme of the distributed database provided in the embodiment of the present disclosure generates at least one data migration task for target data in the first storage node, requests to create a serverless background job pool for executing the at least one data migration task, and adds the at least one data migration task to the serverless background job pool, so as to execute the corresponding data migration task by the serverless background job pool. After receiving the at least one data migration task, the serverless background job pool executes the at least one data migration task to migrate the target data from the first storage node to the second storage node. Wherein, requesting to create the serverless background job pool and processing the data migration task by the serverless background job pool can enable the computing node to execute the data migration task without consuming resources, so that the computing node can focus more on processing user requests to better complete processing of the user requests. In addition, the serverless background job pool can be elastically scaled according to changes of the data migration task, when the number of the serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand, and vice versa, when the number of the data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only the changes of the workload of the data migration task can be better adapted, but also resource costs can be saved. It should be noted that the above application examples of the data migration method of the distributed database provided in the embodiment of the present disclosure are for facilitating understanding and are not used to limit the data migration method of the distributed database provided in the embodiment of the present disclosure.Specifically, the application scenario of the data migration method of the distributed database provided in the embodiments of the present disclosure is not specifically limited, for example, the data migration method of the distributed database provided in the embodiments of the present disclosure can be applied to data migration of cold data in addition to dirty data flushing. In addition, the execution subject of the data migration scheme of the distributed database involved in the present disclosure can be specifically an application program, a service, an instance, a functional component in the form of software, a virtual machine (VM) or a cloud server, or a hardware device (such as a server or a terminal device) or a hardware chip with a data migration function, and the hardware chip can be a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), a neural-network processing unit (NPU), an artificial intelligence (Al) accelerator card or a data processing unit (DPU), etc. The device for implementing data migration can be deployed on a local computing device or a cloud computing platform providing computing power, storage and network resources, and the cloud computing platform can provide services in the mode of infrastructure as a service (laaS), platform as a service (PaaS), software as a service (SaaS) or data as a service (DaaS). Taking the platform providing SaaS software as a service (Software-as-a-Service) as an example, the cloud computing platform can provide a data migration function by using its own computing resources, and the specific application architecture can be built according to service requirements.Moreover, the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for the user to select or edit authorization or refusal. The technical scheme of the present disclosure and how the technical scheme of the present disclosure solves the above technical problems will be described in detail below with specific embodiments. The following related technologies can be combined with the technical scheme of the embodiments of the present disclosure in any way, all of which belong to the protection scope of the embodiments of the present disclosure, and the same or similar concepts or processes may not be described again in some embodiments. FIG. 2 shows a flowchart of a data migration method 200 of a distributed database according to an embodiment of the present disclosure, the distributed database comprising a computing node, a first storage node and a second storage node, the method can comprise steps S201-S203. In step S201, at least one data migration task is generated for target data in the first storage node, wherein the data migration task is used to indicate that the corresponding data is migrated from the first storage node to the second storage node. The first storage node and the second storage node are generally set to represent different storage nodes in a distributed storage system, and do not refer to a specific storage node. For example, if a distributed storage system includes five storage nodes: storage node 1, storage node 2, storage node 3, storage node 4 and storage node 5, if it is necessary to write dirty data in storage node 3 to storage node 4, at this time, the first storage node represents storage node 3, and the second storage node represents storage node 4. For a distributed database using a tiered storage strategy, the first storage node and the second storage node belong to different types of storage nodes in the distributed database. In an example, a distributed database using a tiered storage strategy includes four storage tiers from high to low: a first storage tier, a second storage tier, a third storage tier and a fourth storage tier. Among them, the type of storage node corresponding to the first storage tier is memory, the type of storage node corresponding to the second storage tier is a hard disk drive, the type of storage node corresponding to the third storage tier is a cloud disk, and the type of storage node corresponding to the fourth storage tier is S3.The first storage node generally refers to a storage node corresponding to a relatively high storage layer (for example, a memory, a hard disk drive, or a cloud disk), and the second storage node generally refers to a storage node corresponding to a relatively low storage layer (for example, a hard disk drive, a cloud disk, or S3). Generally, when a memory type storage node is taken as the first storage node, a hard disk drive type storage node is taken as the second storage node; when a hard disk drive type storage node is taken as the first storage node, a cloud disk type storage node is taken as the second storage node; and when a cloud disk type storage node is taken as the first storage node, an S3 type storage node is taken as the second storage node. In the present disclosure embodiment, before at least one data migration task is generated for the target data in the first storage node, the target data in the first storage node needs to be determined. The target data refers to data to be migrated in the first storage node. After the target data in the first storage node is determined, the data proportion corresponding to the specified data in the first storage node can be detected first, and when the data proportion reaches a set threshold, the specified data is determined as the target data. Specifically, the task configuration node can create a polling thread in advance, and use the polling thread to periodically query the data proportion corresponding to the specified data in the first storage node. When the polling thread queries the data proportion corresponding to the specified data in the first storage node, the task configuration node determines the specified data as the data to be migrated (that is, the target data). It should be noted that in the present disclosure embodiment, the specified data generally refers to at least one of dirty data and cold data. The data proportion is used to represent the proportion of the data amount corresponding to the specified data in the total data amount stored in the first storage node, or the data proportion can also be used to represent the proportion of the storage space occupied by the specified data in the total storage space of the first storage node. In the present disclosure embodiment, after at least one data migration task is generated for the target data, step S202 needs to be further executed. In step S202, a serverless background job pool is requested to be created, wherein the serverless background job pool is used to execute at least one data migration task, and the serverless background job pool is independent of the computing node. The serverless background job pool refers to a background job pool running in a serverless computing environment. The serverless background job pool can be elastically scaled according to the change of the data migration task, so that when the serverless background job pool is requested to be created, the resource condition required for executing at least one data migration task can be determined first, and then a corresponding creation request is generated according to the resource condition to request the serverless background job pool to be created.Thus, a serverless background job pool for performing at least one data migration task can be requested from the cloud service provider as needed. The resource conditions include at least the hardware and software resources required by the serverless background job pool, the time required for running the serverless background job pool, and the like. In the present embodiment, after the serverless background job pool is created, step S203 is further performed. In step S203, at least one data migration task is added to the serverless background job pool. In the present embodiment, adding at least one data migration task to the serverless background job pool can mean adding at least one data migration task to a task queue previously created in the serverless background job pool. The data migration method of the distributed database provided in the present embodiment can generate at least one data migration task for target data in the first storage node, request the creation of a serverless background job pool, where the serverless background job pool is used to execute at least one data migration task, and the serverless background job pool is independent of the computing node. After the serverless background job pool is created, at least one data migration task is added to the serverless background job pool, so that the corresponding data migration task is executed by the serverless background job pool. Requesting the creation of a serverless background job pool independent of the computing node and handing over the data migration task to the serverless background job pool independent of the computing node can enable the computing node to focus more on processing user requests without consuming resources to execute data migration tasks, thereby better completing the processing of user requests. In addition, the serverless background job pool can be elastically scaled according to changes in the data migration task. When the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand. Conversely, when the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the changes in the workload of the data migration task be better adapted to, but also resource costs can be saved. Corresponding to the application example of the method provided in the present embodiment and the first data migration method provided in the present embodiment, the present embodiment further provides a second data migration method of a distributed database. As shown in FIG. 3, which is a flowchart of the first data migration method 300 provided in the present embodiment, the distributed database includes a computing node, a first storage node, and a second storage node. The method can include steps S301-S304. In step S301, in response to detecting that the proportion of dirty data in the corresponding data in the first storage node reaches a set threshold value, the dirty data is determined as target data.The data proportion can be used to represent the proportion of the data amount of the dirty data in the total data amount stored in the first storage node, or the data proportion can also be used to represent the proportion of the storage space occupied by the dirty data in the total storage space of the first storage node. In step S302, at least one data migration task is generated for the target data in the first storage node, wherein the data migration task is used to indicate that the corresponding data is migrated from the first storage node to the second storage node. The first storage node and the second storage node are generally arranged to represent different storage nodes in the distributed storage system, and do not refer to a specific storage node. For example, if the distributed storage system includes five storage nodes, storage node 1, storage node 2, storage node 3, storage node 4 and storage node 5, if it is necessary to write the dirty data in the storage node 3 into the storage node 4, at this time, the first storage node represents the storage node 3, and the second storage node represents the storage node 4. For the distributed database using the hierarchical storage strategy, the first storage node and the second storage node belong to different types of storage nodes in the distributed database. In an example, the distributed database using the hierarchical storage strategy includes four storage levels from high to low: the first storage level, the second storage level, the third storage level and the fourth storage level. Among them, the type of the storage node corresponding to the first storage level is memory, the type of the storage node corresponding to the second storage level is hard disk drive, the type of the storage node corresponding to the third storage level is cloud disk, and the type of the storage node corresponding to the fourth storage level is S3. The first storage node generally refers to the storage node corresponding to the relatively higher storage layer (for example: memory, hard disk drive or cloud disk), and the second storage node generally refers to the storage node corresponding to the relatively lower storage layer (for example: hard disk drive, cloud disk or S3). Generally, when the memory type storage node is used as the first storage node, the hard disk drive type storage node is used as the second storage node; when the hard disk drive type storage node is used as the first storage node, the cloud disk type storage node is used as the second storage node; when the cloud disk type storage node is used as the first storage node, the S3 type storage node is used as the second storage node. In step S303, a serverless background job pool is requested to be created, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node. The serverless background job pool refers to a background job pool running in a serverless computing environment.The serverless background job pool can be elastically scaled according to changes of the data migration tasks, and therefore, when a request for creating the serverless background job pool is received, the resources required for executing at least one data migration task can be determined first, and then a corresponding creation request can be generated according to the resource condition, to request the cloud service provider to create the serverless background job pool for executing the at least one data migration task. In this way, the serverless background job pool for executing the at least one data migration task can be requested to be created as needed. The resource condition at least includes the software and hardware resources required by the serverless background job pool, and the time required for running the serverless background job pool. In step S304, the at least one data migration task is added to the serverless background job pool. In the present disclosure, adding the at least one data migration task to the serverless background job pool can mean adding the at least one data migration task to a task queue pre-created in the serverless background job pool. The data migration method of the distributed database provided in the present disclosure can generate at least one data migration task for target data in the first storage node, request the creation of a serverless background job pool independent of the computing node for executing the at least one data migration task, and add the at least one data migration task to the serverless background job pool, so that the serverless background job pool executes the corresponding data migration task. Requesting the creation of the serverless background job pool independent of the computing node and processing the data migration task by the serverless background job pool independent of the computing node can enable the computing node to not consume resources for executing the data migration task, so that the computing node can focus more on processing user requests and better complete the processing of the user requests. In addition, the serverless background job pool can be elastically scaled according to changes of the data migration tasks, when the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand. Conversely, when the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, the changes in the workload of the data migration task can be better adapted, and the resource cost can be saved. Corresponding to the application example of the method provided in the present disclosure and the first data migration method of the distributed database, the second data migration method of the distributed database provided in the present disclosure, the present disclosure further provides a third data migration method of the distributed database, as shown in FIG. 4, which is a flowchart of the first data migration method 400 provided in the present disclosure, the distributed database includes a computing node, a first storage node and a second storage node, and the method can include steps S401-S404.In step S401, in response to detecting that the proportion of cold data in the first storage node reaches a set threshold, the cold data is determined as target data. The data proportion can be used to represent the proportion of the data amount corresponding to the cold data in the total data amount stored in the first storage node, or the data proportion can also be used to represent the proportion of the storage space occupied by the cold data in the total storage space of the first storage node. In step S402, at least one data migration task is generated for the target data in the first storage node, wherein the data migration task is used to indicate that the corresponding data is migrated from the first storage node to the second storage node. The first storage node and the second storage node are generally set to represent different storage nodes in the distributed storage system, and do not refer to a specific storage node. For example, if the distributed storage system includes five storage nodes: storage node 1, storage node 2, storage node 3, storage node 4, and storage node 5, if it is necessary to write the cold data in the storage node 3 to the storage node 4, at this time, the first storage node represents the storage node 3, and the second storage node represents the storage node 4. For a distributed database using a hierarchical storage strategy, the first storage node and the second storage node belong to different types of storage nodes in the distributed database. In an example, the distributed database using the hierarchical storage strategy includes four storage levels from high to low: the first storage level, the second storage level, the third storage level, and the fourth storage level. The type of the storage node corresponding to the first storage level is memory, the type of the storage node corresponding to the second storage level is a hard disk drive, the type of the storage node corresponding to the third storage level is a cloud disk, and the type of the storage node corresponding to the fourth storage level is S3. The first storage node generally refers to the storage node corresponding to the relatively higher storage layer (for example: memory, hard disk drive, or cloud disk), and the second storage node generally refers to the storage node corresponding to the relatively lower storage layer (for example: hard disk drive, cloud disk, or S3). Generally, when the memory type storage node is used as the first storage node, the hard disk drive type storage node is used as the second storage node; when the hard disk drive type storage node is used as the first storage node, the cloud disk type storage node is used as the second storage node; and when the cloud disk type storage node is used as the first storage node, the S3 type storage node is used as the second storage node. In step S403, a serverless background job pool is requested to be created, wherein the serverless background job pool is used to execute at least one data migration task, and the serverless background job pool is independent of the computing node.The serverless background job pool refers to a background job pool running in a serverless computing environment. The serverless background job pool can be elastically scaled according to changes in data migration tasks, and therefore, when a request is created for the serverless background job pool, the resource condition required for executing at least one data migration task can be determined first, and then a corresponding creation request is generated according to the resource condition to request the creation of the serverless background job pool. In this way, the serverless background job pool for executing at least one data migration task can be requested to be created from a cloud service provider as needed. The resource condition at least includes the software and hardware resources required by the serverless background job pool, the time required for the serverless background job pool to run, and the like. In step S404, at least one data migration task is added to the serverless background job pool. In the present disclosure, adding at least one data migration task to the serverless background job pool can refer to adding at least one data migration task to a task queue pre-created in the serverless background job pool. The data migration method provided in the present disclosure, after generating at least one data migration task for the target data in the first storage node, requests the creation of a serverless background job pool independent of the computing node for executing at least one data migration task, and adds at least one data migration task to the serverless background job pool, so as to execute the corresponding data migration task by the serverless background job pool. Wherein, requesting the creation of a serverless background job pool independent of the computing node and handing over the data migration task to the serverless background job pool independent of the computing node can enable the computing node to not consume resources to execute the data migration task, so as to enable it to focus more on processing user requests, and better complete the processing of user requests. In addition, the serverless background job pool can be elastically scaled according to changes in data migration tasks, when the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand. Conversely, when the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the changes in the workload of data migration tasks be better adapted, but also resource costs can be saved.Corresponding to the application example of the method provided in the embodiments of the present disclosure and the data migration method of the first distributed database, the data migration method of the second distributed database and the data migration method of the third distributed database provided in the embodiments of the present disclosure, the embodiments of the present disclosure further provide a fourth data migration method of a distributed database, as shown in FIG. 5, which is a flowchart of the first data migration method 500 provided in the embodiments of the present disclosure. The distributed database includes a computing node, a first storage node and a second storage node. The application is created independently of the computing node. Specifically, it can include steps S501-S502o In step S501, at least one data migration task sent by a task configuration node is received. The at least one data migration task is generated for target data in the first storage node. In the embodiments of the present disclosure, the target data refers to the data to be migrated stored in the first storage node, which generally refers to the dirty data or cold data stored in the first storage node. Generally, the at least one data migration task is written in the task queue created in advance in the serverless background job pool. After receiving the at least one data migration task, the serverless background job pool needs to further execute step S502o In step S502, at least one data migration task is executed, wherein the data migration task is used to migrate the target data from the first storage node to the second storage node. The first storage node and the second storage node are generally set to represent different storage nodes in a distributed storage system, and do not refer to a specific storage node. For example, if the distributed storage system includes five storage nodes: storage node 1, storage node 2, storage node 3, storage node 4 and storage node 5, if it is necessary to write the cold data in the storage node 3 to the storage node 4, at this time, the first storage node represents the storage node 3, and the second storage node represents the storage node 4o For a distributed database using a tiered storage strategy, the first storage node and the second storage node belong to different types of storage nodes in the distributed database. In an example, a distributed database using a tiered storage strategy includes four storage tiers from high to low: a first storage tier, a second storage tier, a third storage tier and a fourth storage tier. Among them, the type of the storage node corresponding to the first storage tier is memory, the type of the storage node corresponding to the second storage tier is a hard disk drive, the type of the storage node corresponding to the third storage tier is a cloud disk, and the type of the storage node corresponding to the fourth storage tier is S3.The first storage node generally refers to a storage node corresponding to a relatively high storage layer (for example, a memory, a hard disk drive, or a cloud disk), and the second storage node generally refers to a storage node corresponding to a relatively low storage layer (for example, a hard disk drive, a cloud disk, or S3). Generally, when a memory type storage node is used as the first storage node, a hard disk drive type storage node is used as the second storage node; when a hard disk drive type storage node is used as the first storage node, a cloud disk type storage node is used as the second storage node; and when a cloud disk type storage node is used as the first storage node, an S3 type storage node is used as the second storage node. During execution of the at least one data migration task, the serverless background job pool repeatedly performs the following steps until the at least one data migration task is executed completely: first, determining currently existing unexecuted data migration tasks in the task queue, and then taking out a target data migration task from the unexecuted data migration tasks and executing the target data migration task. In a case where the at least one data migration task is executed completely, the serverless background job pool releases resources occupied by the serverless background job pool. The data migration solution for a distributed database provided in the present disclosure is provided. After receiving the at least one data migration task, the serverless background job pool executes the at least one data migration task to migrate target data from the first storage node to the second storage node. By handing over the data migration task to the serverless background job pool created independently of the computing node, the computing node can perform the data migration task without consuming resources, so that the computing node can focus more on processing user requests to better complete processing of the user requests. In addition, the serverless background job pool can be elastically scaled according to changes in the data migration task. When the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand, and conversely, when the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the changes in the workload of the data migration task be better adapted to, but also resource costs can be saved. Corresponding to the application example of the method provided in the present disclosure and the data migration method for the distributed database provided in the present disclosure, the present disclosure further provides a data migration system for a distributed database. As shown in FIG. 6, which is a structural block diagram of a data migration system 600 for a distributed database according to an embodiment of the present disclosure, the system 600 can include a task configuration node 601 and a serverless background job pool 602. The task configuration node 601 is configured to execute the first data migration method for a distributed database provided in the present disclosure.The serverless background job pool 602 is configured to execute the fourth distributed database data migration method provided in the embodiments of the present disclosure. The functions of each node in each device in the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here again. Corresponding to the application example of the method provided in the embodiments of the present disclosure and the first distributed database data migration method provided in the embodiments of the present disclosure, the embodiments of the present disclosure also provide a distributed database data migration device. As shown in FIG. 7, it is a structure block diagram of a distributed database data migration device 700 in an embodiment of the present disclosure, the distributed database includes a computing node, a first storage node and a second storage node, the device 700 can include: a data migration task generation component 701 configured to generate at least one data migration task for target data in the first storage node, wherein the data migration task is used to indicate that the corresponding data is migrated from the first storage node to the second storage node; a job pool creation request component 702 configured to request to create a serverless background job pool, wherein the serverless background job pool is used to execute at least one data migration task, and the serverless background job pool is independent of the computing node; a data migration task adding component 703 configured to add at least one data migration task to the serverless background job pool. In a possible implementation manner, the device further includes: a data proportion detection component configured to detect a data proportion of specified data in the first storage node, wherein the specified data is at least one of dirty data and cold data; a target data determination component configured to determine the specified data as target data in response to the data proportion reaching a set threshold. In a possible implementation manner, the job pool creation request component 702 includes: a resource condition determination sub-component configured to determine a resource condition required for executing at least one data migration task; a creation request generation sub-component configured to generate a corresponding creation request for the resource condition, wherein the creation request is used to request to create a serverless background job pool. In a possible implementation manner, the data migration task adding component 703 is specifically configured to: add at least one data migration task to a task queue, wherein the task queue is pre-created in the serverless background job pool. In a possible implementation manner, the first storage node and the second storage node belong to different types of storage nodes. The functions of each component in each device in the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here again.Corresponding to the application example of the method provided by the embodiments of the present disclosure and the second data migration method provided in the embodiments of the present disclosure, the embodiments of the present disclosure further provide another data migration apparatus. As shown in FIG. 8, which is a structural block diagram of a data migration apparatus 800 according to an embodiment of the present disclosure, the distributed database includes a computing node, a first storage node and a second storage node, and the apparatus 800 can include: a target data determination component 801 configured to determine dirty data as target data in response to detecting that a data proportion corresponding to the dirty data in the first storage node reaches a set threshold value; a data migration task generation component 802 configured to generate at least one data migration task for the target data, wherein the data migration task is used to indicate that corresponding data is migrated from the first storage node to the second storage node; a job pool creation request component 803 configured to request to create a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and a data migration task adding component 804 configured to add the at least one data migration task to the serverless background job pool. The functions of the components in each apparatus of the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here again. Corresponding to the application example of the method provided by the embodiments of the present disclosure and the third data migration method of the distributed database provided in the embodiments of the present disclosure, the embodiments of the present disclosure further provide another data migration apparatus of the distributed database. Please refer to FIG. 8 again, which is a structural block diagram of a data migration apparatus 800 according to an embodiment of the present disclosure, the distributed database includes a computing node, a first storage node and a second storage node, and the apparatus 800 can include: a target data determination component configured to determine cold data as target data in response to detecting that a data proportion corresponding to the cold data in the first storage node reaches a set threshold value; a data migration task generation component 802 configured to generate at least one data migration task for the target data, wherein the data migration task is used to indicate that corresponding data is migrated from the first storage node to the second storage node; a job pool creation request component 803 configured to request to create a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and a data migration task adding component 804 configured to add the at least one data migration task to the serverless background job pool. The functions of the components in each apparatus of the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here again.Corresponding to the application example of the method provided by the embodiments of the present disclosure and the data migration method of the fourth distributed database provided in the embodiments of the present disclosure, the embodiments of the present disclosure provide a data migration apparatus of the fourth distributed database. As shown in FIG. 9, it is a structural block diagram of a data migration apparatus 900 of an embodiment of the present disclosure, the distributed database includes a computing node, a first storage node and a second storage node, the apparatus 900 is applied to a serverless background job pool created independently of the computing node, and specifically can include: a data migration task receiving component 901 configured to receive at least one data migration task sent by a task configuration node, wherein the at least one data migration task is generated for target data in the first storage node; a data migration task executing component 902 configured to execute the at least one data migration task, wherein the data migration task is used to migrate the target data from the first storage node to the second storage node. In a possible implementation manner, the at least one data migration task is placed in a task queue; the data migration task executing component 902 is specifically used to repeatedly execute the following steps until the at least one data migration task is executed: determining an unexecuted data migration task currently existing in the task queue; taking out a target data migration task from the unexecuted data migration task, and executing the target data migration task. In a possible implementation manner, the first storage node and the second storage node belong to different types of storage nodes. The functions of the components in each apparatus of the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here. The functions of the components in each apparatus of the embodiments of the present disclosure can be referred to the corresponding description in the above method, and have the corresponding beneficial effects, which will not be described here. FIG. 10 is a block diagram of an electronic device for implementing the embodiments of the present disclosure. As shown in FIG. 10, the electronic device includes: a memory 1001 and a processor 1002, the memory 1001 stores a computer program capable of running on the processor 1002. The processor 1002 executes the computer program to implement the method in the above embodiments. The number of the memory 1001 and the processor 1002 can be one or more. The electronic device further includes: a communication interface 1003 configured to communicate with external devices to transmit data. If the memory 1001, the processor 1002 and the communication interface 1003 are independently implemented, the memory 1001, the processor 1002 and the communication interface 1003 can be connected with each other through a bus and complete the communication among them.The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in FIG. 10, but it does not mean that there is only one bus or only one type of bus. Optionally, in a specific implementation, if the memory 1001, the processor 1002, and the communication interface 1003 are integrated on a chip, the memory 1001, the processor 1002, and the communication interface 1003 can complete communication with each other through an internal interface. The embodiment of the disclosure provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the method provided in the embodiment of the disclosure. The embodiment of the disclosure also provides a chip, which includes a processor, a memory, and a communication interface. The processor is configured to call and run instructions stored in the memory, so that the communication device installed with the chip executes the method provided in the embodiment of the disclosure. The embodiment of the disclosure also provides a chip, which includes an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute the code in the memory. When the code is executed, the processor is configured to execute the method provided in the embodiment of the disclosure. It should be understood that the above processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any general-purpose processor, etc. It should be noted that the processor can be an advanced RISC machine (ARM) architecture processor.Further, the memory can optionally include a read-only memory and a random access memory, and can also include a non-volatile random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can include a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM) used as an external cache. By way of example, and not limitation, a number of forms of RAM can be used. For example, a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous dynamic RAM (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a synchlink DRAM (SLDRAM), and a direct Rambus RAM (DR RAM) can be used. OIn the above-described embodiments, all or part can be realized by software, hardware, firmware, or any combination thereof. When realized by software, all or part can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, all or part generates a flow or function according to the present disclosure. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials, or characteristics described can be combined in any appropriate manner in one or more embodiments or examples. Furthermore, the skilled person in the art can combine and combine different embodiments or features of different embodiments or examples described in the specification without contradiction. In addition, the terms "first", "second" are for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include at least one feature. In the description of the present disclosure, the meaning of "a plurality of" is two or more, unless otherwise specifically limited. Any process or method described in the flowchart or otherwise described herein can be understood as a component, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. Moreover, the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions can be performed in an order other than that shown or discussed, including in a substantially simultaneous manner according to the functions involved or in reverse order. The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a list of ordered sequences of executable instructions for implementing logical functions, which can be specifically implemented in any computer-readable medium for use by an instruction execution system, device, or apparatus, such as a computer-based system, a system including a processor, or other system that can fetch and execute instructions from the instruction execution system, device, or apparatus, or in conjunction with these instructions.It should be understood that various parts of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above implementation, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by relevant hardware instructed by a program, which can be stored in a computer readable storage medium. When the program is executed, it includes one or a combination of steps of the method embodiment. In addition, the functional components in various embodiments of the present disclosure can be integrated into a processing component, or each component can exist physically alone, or two or more components can be integrated into one component. The integrated component can be implemented in the form of hardware or software functional components. If the integrated component is implemented in the form of software functional components and sold or used as an independent product, it can also be stored in a computer readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc. The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of various changes or replacements within the technical scope disclosed by the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims. The scheme provided by the embodiment of the present disclosure can be applied to the data migration process of a distributed database. After generating at least one data migration task for the target data in the first storage node, a serverless background job pool is requested to be created, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node. After creating the serverless background job pool, the at least one data migration task is added to the serverless background job pool, so that the corresponding data migration task is executed by the serverless background job pool, which can enable the computing node to execute the data migration task without consuming resources, thereby enabling it to focus more on processing user requests to better complete the processing of user requests. In addition, the serverless background job pool can be elastically scaled according to the change of the data migration task. When the number of serverless background job pools increases, the capacity of the serverless background job pool can be dynamically increased to meet the demand, and vice versa. When the number of data migration tasks decreases, the capacity of the serverless background job pool can be dynamically reduced. In this way, not only can the change of the work load of the data migration task be better adapted, but also the resource cost can be saved.

Claims

CLAIM 1. A data migration method of a distributed database, the distributed database comprising a computing node, a first storage node, and a second storage node, the method comprising: generating at least one data migration task for the target data in the first storage node, wherein the data migration task is used to indicate migration of corresponding data from the first storage node to the second storage node; requesting creation of a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and adding the at least one data migration task to the serverless background job pool.

2. The method of claim 1, wherein, The method further includes: detecting a data proportion of specified data in the first storage node, wherein the specified data is at least one of dirty data and cold data; and in response to the data proportion reaching a set threshold, determining the specified data as the target data.

3. The method of claim 1, wherein, The request for creation of the serverless background job pool for execution of the at least one data migration task and independent of the computing node includes: determining a resource condition required for execution of the at least one data migration task; and generating a corresponding creation request for the resource condition, wherein the creation request is used to request creation of the serverless background job pool.

4. The method of claim 1, wherein, The adding of the at least one data migration task to the serverless background job pool includes: adding the at least one data migration task to a task queue, wherein the task queue is pre-created in the serverless background job pool.

5. The method of claim 1, wherein, The first storage node and the second storage node belong to different types of storage nodes.

6. A data migration method of a distributed database, the distributed database comprising a computing node, a first storage node, and a second storage node, the method comprising: In response to detecting that a data proportion of dirty data in the first storage node reaches a set threshold, the dirty data is determined as target data. For the target data, at least one data migration task is generated, wherein the data migration task is used to indicate migration of corresponding data from the first storage node to the second storage node; a serverless background job pool is requested to be created, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and the at least one data migration task is added to the serverless background job pool.

7. A data migration method of a distributed database, the distributed database comprising a computing node, a first storage node, and a second storage node, the method comprising: in response to detecting that a corresponding data proportion of cold data in the first storage node reaches a set threshold, determining the cold data as target data; generating at least one data migration task for the target data, wherein the data migration task is used to instruct to migrate corresponding data from the first storage node to the second storage node; requesting to create a serverless background job pool, wherein the serverless background job pool is used to execute the at least one data migration task, and the serverless background job pool is independent of the computing node; and adding the at least one data migration task to the serverless background job pool.

8. A data migration method of a distributed database, the distributed database comprising a computing node, a first storage node and a second storage node, the method being applied to a serverless background job pool created independently of the computing node, comprising: receiving at least one data migration task sent by a task configuration node, wherein the at least one data migration task is generated for target data in the first storage node; and executing the at least one data migration task, wherein the data migration task is used to migrate the target data from the first storage node to the second storage node.

9. The method of claim 8, wherein, The at least one data migration task is placed in a task queue; and the executing the at least one data migration task comprises: repeatedly performing the following steps until the at least one data migration task is executed: determining an unexecuted data migration task currently existing in the task queue; taking out a target data migration task from the unexecuted data migration task, and executing the target data migration task.

10. The method of claim 8, wherein, The first storage node and the second storage node belong to different types of storage nodes.

11. The method of claim 8, wherein, The method further comprises: in a case where the at least one data migration task is executed completely, releasing resources occupied by the at least one data migration task in the serverless background job pool.

12. A data migration system for a distributed database, comprising: a task configuration node and a serverless background job pool; The task configuration node is configured to perform the method of any one of claims 1-5. The serverless background job pool is configured to perform the method of any one of claims 8-11. 13.An electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method of any one of claims 1-11 when executing the computer program. 14.A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program implements the method of any one of claims 1-11 when executed by a processor.

15. A computer program product, wherein, comprising a computer program, wherein the computer program implements the method of any one of claims 1-11 when executed by a processor.

16. A computer program product, wherein, comprising a non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium stores a computer program, and the computer program implements the method of any one of claims 1-11 when executed by a processor.

17. A computer program, wherein, The computer program, which is executed by a processor, implements the method as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

  • A runtime data migration method and system in a container environment

    CN113704218B

  • Migration method, system and device for virtual machine with large amount of dirty data and medium

    CN116048730A

  • Cold data migration method and device, cold data acquisition method and device, medium and electronic equipment

    CN117289868A

  • Multi-Device Synchronization Systems and Methods

    US20220137821A1