Data processing method, device, electronic device and computer readable storage medium

By setting up parallel execution units in the metadata node cluster of distributed database system, each unit maintains the metadata of data shards, solving the problems of degraded performance and low availability of the main metadata node in large-scale storage node clusters, and realizing Efficient metadata management and system scalability.

CN118673086BActive Publication Date: 2024-11-08PINGCAP XINGCHEN (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411155900.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-08
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

In distributed database systems, the primary metadata node needs to maintain a large amount of metadata and process a large number of message requests, resulting in reduced performance and reduced availability, especially when the storage node cluster reaches large or ultra-large scale, it is difficult for a single primary metadata node to be difficult for a single primary metadata node to maintain a large or ultra-large scale. Provide services to the cluster.

Method used

A parallel execution unit is set up in the metadata node cluster. Each parallel execution unit maintains the metadata of the corresponding data shards separately. When the computing layer needs to obtain the target metadata, it only interacts with the target execution unit that stores the target metadata, and multiple parallels are carried out. The execution unit can work simultaneously, improves the throughput of the metadata layer and does not affect other parallel execution units when the target execution unit fails.

Benefits of technology

It improves metadata management efficiency, enhances the scalability and high availability of the system, ensures that even new data shards will not affect the system operation efficiency too much, and maintains the stability of the system in the event of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673086B_ABST
    Figure CN118673086B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a data processing method, device, electronic device and computer-readable storage medium, which relate to the field of distributed database technology. The method includes: if the computing layer determines that the target metadata required for the data to be operated is not cached locally, then the target first data interval where the target data identifier is located is determined from the first data interval of each parallel execution unit cached locally, and the parallel execution unit corresponding to the target first data interval is used as the target parallel execution unit, and the target data shard is determined from at least one data shard bound to the target parallel execution unit; according to the target metadata, the target operation type is performed on the data to be operated in the target data shard. The embodiments of the present application realize that each parallel execution unit maintains the metadata of the corresponding data shard separately, and is not limited to a single master metadata node to provide metadata, thereby improving the management efficiency and scalability of the metadata layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of distributed databases. Specifically, the present application relates to a data processing method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the database field, metadata is data that describes the structure and content of a database. It is data that describes the data in the database. Metadata includes but is not limited to the identification of storage nodes or data shards, data dictionary information, routing information, and database statistics.

[0003] The distributed database system includes a metadata layer, which includes a metadata node cluster. There is only one master metadata node among all metadata nodes. Only the master metadata node provides metadata of data shards to the outside world for access by computing nodes in the computing layer. At the same time, the master metadata node also manages the metadata of data shards in the storage layer.

[0004] However, when the storage node cluster in the distributed database system is large-scale or ultra-large-scale, the master metadata node also needs to maintain a large amount of metadata, and there are also many computing nodes that obtain metadata, which will generate a huge amount of messages. A single metadata master node is difficult to serve such a large-scale cluster. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, device, electronic device, computer-readable storage medium and computer program product for solving the technical problems in the background technology.

[0006] According to a first aspect of an embodiment of the present application, a data processing method is provided, which is applied to a distributed database system, wherein the distributed database system includes a computing layer, a storage layer, and a metadata layer, wherein the metadata layer includes a management node and a metadata node cluster, and the method is executed by the computing layer, and the method includes: obtaining a target data identifier and a target operation type of the data to be operated;

[0007] If it is determined that the target metadata required for the data to be operated is not cached locally, the target first data interval where the target data identifier is located is determined from the first data intervals of each parallel execution unit pre-cached locally, and the parallel execution unit corresponding to the target first data interval is used as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer and is used to store metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard;

[0008] According to the target data identifier, determine the target data slice from at least one data slice bound to the target parallel execution unit, and obtain target metadata of the target data slice from the target parallel execution unit;

[0009] According to the target metadata, in the target data shard, the target operation type of operation is performed on the data to be operated.

[0010] According to a second aspect of an embodiment of the present application, a data processing device is provided, which is applied to a distributed database system. The distributed database system includes a computing layer, a storage layer, and a metadata layer. The metadata layer includes a management node and a metadata node cluster. The device is located in the computing layer. The device includes:

[0011] A first obtaining module is used to obtain a target data identifier and a target operation type of the data to be operated;

[0012] A target parallel execution unit determination module is used to determine the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally if it is determined that the target metadata required for the data to be operated is not cached locally, and use the parallel execution unit corresponding to the target first data interval as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer, and is used to store the metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard;

[0013] A target data shard determination module is used to determine a target data shard from at least one data shard bound to a target parallel execution unit according to a target data identifier, and obtain target metadata of the target data shard from the target parallel execution unit;

[0014] The operation module is used to perform the target operation type operation on the data to be operated in the target data shard according to the target metadata.

[0015] According to a third aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and when the processor executes the program, the steps of the method provided in the first aspect are implemented.

[0016] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.

[0017] According to the fifth aspect of the embodiment of the present application, a computer program product is provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. When a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the computer device executes the steps of implementing the method provided in the first aspect.

[0018] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0019] In the embodiment of the present application, at least one parallel execution unit is set in each metadata node of the metadata node cluster of the metadata layer, and each parallel execution unit respectively maintains the metadata of the corresponding data slice, and is not limited to a single main metadata node to provide metadata, which can improve management efficiency;

[0020] The metadata of data shards is jointly managed by multiple parallel execution units. Even if metadata of new data shards is added, it will not affect the operating efficiency of the system too much, thus enhancing the scalability of the system.

[0021] When the computing layer needs to obtain the target metadata, it only needs to interact with the target execution unit that stores the target metadata. Multiple parallel execution units can work simultaneously, which improves the throughput of the metadata layer. In addition, even if the target execution unit fails, it will not affect other parallel execution units, thereby enhancing the high availability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0023] Figure 1 A schematic diagram of a system architecture for obtaining metadata in a distributed database system in an existing solution provided in an embodiment of the present application;

[0024] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;

[0025] Figure 3 A flowchart of another data processing method provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of the operation flow of the metadata management node cluster provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of a process for each data slice to report its own first heartbeat information provided in an embodiment of the present application;

[0028] Figure 6A schematic diagram of a process for each storage node to report its own second heartbeat information provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of a system architecture for implementing a data processing method in a distributed database system provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0033] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".

[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0035] First, several terms involved in this application are introduced and explained:

[0036] The database system includes a computing layer, a storage layer, a metadata layer, etc. Of course, it can also include a management layer (including multiple management nodes), etc., which is not limited in the embodiments of the present application.

[0037] The computing layer of the database system refers to the part of the database system that is responsible for data computing and processing. In a distributed database system, the computing layer includes multiple computing nodes, each of which includes a parser, optimizer, and executor. Each computing node can perform data computing and processing, including but not limited to: executing SQL statements, querying, modifying, adding, and other operations on the data in the database; managing the cache inside the database; processing database transactions, etc.

[0038] The storage layer of the database system is mainly responsible for the storage management and access of database data (including data tables and indexes in data tables). In a distributed database system, the storage layer includes multiple storage nodes, each of which has data storage capabilities.

[0039] The metadata layer of the database system is mainly responsible for managing the metadata defined by the database. Metadata is even more crucial because it needs to span multiple storage nodes and data shards to ensure data consistency and availability. The metadata layer can provide metadata services to computing nodes. The metadata layer of the distributed database system includes multiple metadata nodes. Metadata nodes can provide metadata to the outside world. Metadata is data that describes the data in the database. Metadata includes but is not limited to data dictionary information of storage nodes or data shards, data sharding strategies (strategies are used to indicate how to distribute data to different nodes or shards to achieve data load balancing and high availability), routing information, database statistics, data consistency maintenance strategies, permission management, etc.

[0040] Among them, data dictionary information refers to the definition, description and attribute information of all database objects (tables, views, indexes, stored procedures) in the database.

[0041] The routing information of a storage node refers to the information used to determine the transmission path of data in a distributed storage system, including but not limited to the node identification, node location (indicating the physical or logical location of the node, such as IP address, host name, etc.), the routing table maintained by the storage node itself, and the shard information of each data shard in the storage node (shard identification, data interval, etc.).

[0042] The routing information of a data shard is used to indicate the storage node where the data shard is located, its position in the storage node, and its replication status, which is very important for executing queries and transaction processing.

[0043] Database statistics refer to the number of rows, data distribution, index statistics, etc. of a data table, which are used to optimize queries and performance tuning.

[0044] The data consistency maintenance strategy aims to maintain data consistency. Data consistency must also be maintained during data migration, replication, or node failure recovery in a distributed database system.

[0045] Permission management refers to the responsibility for managing data access rights and security policies to ensure that only authorized users can access and modify data.

[0046] like Figure 1 As shown, it exemplarily shows a schematic diagram of a system architecture for obtaining metadata in a distributed database system in an existing solution, such as Figure 1 As shown, it includes the computing layer, storage layer and metadata layer.

[0047] The computing layer includes multiple computing nodes, namely computing node 1, computing node 2, etc.

[0048] The storage layer includes multiple storage nodes including storage node 1, storage node 2, storage node 3, storage node 4, etc. Each storage node includes several data shard regions. The data shards are configured as multiple copies. When the computing node writes data to the shard, multiple copies of the same data shard synchronize data through a consistency protocol (also known as a copy synchronization algorithm, such as Paxos, Raft, etc.). The multiple copies of the shard include the shard master copy and the shard slave copy. Each data shard group is usually configured as a three-copy mode, that is, it includes one master copy and two slave copies.

[0049] like Figure 1 As shown, the data shards in storage node 1 are: data shard a1 (master), data shard a2 (slave), and data shard a3 (slave); the data shards in storage node 2 are data shard a1 (slave), data shard a2 (master), and data shard a4 (slave); the data shards in storage node 3 are data shard a1 (slave), data shard a3 (master), and data shard a4 (slave); the data shards in storage node 4 are data shard a2 (slave), data shard a3 (slave), and data shard a4 (master).

[0050] Assuming that data shards with the same shard identifier (assuming a1, a2, a3, and a4 are shard identifiers) belong to one data shard group, then data shard a1 (master) in storage node 1, data shard a1 (slave) in storage node 2, and data shard a1 (slave) in storage node 3 belong to one data shard group. Other data shard groups are not given examples here one by one. In general, each data shard group also follows the replica synchronization algorithm (such as the consensus algorithm raft algorithm or Paxos algorithm), including the master shard and multiple slave shards that store the same data.

[0051] The metadata layer includes a metadata node cluster, which includes at least three metadata nodes (usually three). The at least three metadata nodes include a master metadata node (meta-server leader) and at least two slave metadata nodes (meta-server follower), which are metadata node 1, metadata node 2, and metadata node 3. Assume that metadata node 2 is the master metadata node, and metadata node 1 and metadata node 3 are slave metadata nodes. The master metadata node and the slave metadata node are both used to store the metadata of the entire distributed database system, but only the master metadata node provides metadata to the outside, that is, external (such as computing nodes) access to metadata is through the master metadata node. When the master metadata node fails, a new master metadata node will be selected from at least two slave metadata nodes according to the replica synchronization algorithm (such as the consensus algorithm raft algorithm or Paxos algorithm), and the original master metadata node will become a slave metadata node.

[0052] However, among the at least three metadata nodes in the metadata node cluster that follows the replica synchronization algorithm, there is only one master metadata node that provides metadata to the outside world, and the slave metadata node does not directly provide metadata. This approach will lead to the following problems:

[0053] 1. Reduced cluster availability

[0054] If the primary metadata node fails, it may take some time to elect a new primary metadata node. During this period, the entire metadata node cluster cannot provide normal metadata services, and the availability of the cluster is greatly reduced. Availability can only be restored after a new primary metadata node is elected.

[0055] 2. Causing performance bottlenecks and delays

[0056] Almost all computing nodes in the computing layer will communicate with the main metadata node. Figure 1 In the example, computing nodes 1, 2, etc. all communicate with the master metadata node 2. If each computing node must communicate with the master metadata node to obtain the target metadata required for the data to be operated before reading or writing data to the storage node (the target metadata includes the metadata of the target data shard to which the data to be operated belongs. The target metadata refers to the shard information of the target data shard. The shard information includes data dictionary information and routing information, etc.), a huge number of message requests will cause the metadata node latency to increase and the cluster performance to degrade.

[0057] In addition, all storage nodes and data shards in the storage layer (for data shard groups that follow the replica synchronization algorithm, the data shards here refer to the primary data shards) need to report heartbeat information to the primary metadata node regularly, such as Figure 1 Data shard a1 (primary), data shard a2 (primary), data shard a3 (primary) and data shard a4 (primary) all report the first heartbeat message to metadata node 2, and storage node 1, storage node 2...storage node 4 all report the second heartbeat information to metadata node 2 (primary metadata node).

[0058] The master metadata node uses heartbeat information to monitor the operating status of the data nodes and data shards of the entire storage layer in real time, and finally creates scheduling tasks based on the operating status to achieve cluster load balancing and fault tolerance.

[0059] When there are fewer storage nodes and data shards in the storage node cluster in the storage layer, the metadata that needs to be maintained is also relatively small, and the master metadata node can maintain the normal operation of the storage node cluster. However, when the storage node cluster reaches a large or ultra-large scale, the amount of metadata that the master metadata node needs to maintain is very large, and the computing nodes and storage nodes that interact with the master metadata node are also very large. A single master metadata node in the metadata node cluster will not be able to provide such a large-scale metadata service. There is a problem of a central node or a single node limiting the cluster size of the storage node.

[0060] Assume that there are 1024 storage nodes in the storage node cluster, each storage node is configured with 4T storage space, and the default size of the data shard region is 96M. If each data shard is configured with 3 copies of storage, the data in the data shard region will be about 15 million. This will lead to the following two problems: First, the amount of metadata to be maintained is huge; second, the number of message requests is huge. The huge metadata and huge message requests will increase the latency of the metadata node and reduce the performance of the cluster, which will directly affect the scalability of the cluster.

[0061] The data processing method, device, electronic device, computer-readable storage medium, and computer program product provided in this application are intended to solve the above technical problems in the prior art.

[0062] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0063] The present application provides a data processing method, such as Figure 2As shown, the method is applied to a distributed database system, the distributed database system includes a computing layer, a storage layer and a metadata layer; the metadata layer includes a metadata node cluster, the metadata layer includes a management node and a metadata node cluster, and the method is executed by the computing layer, and the method includes:

[0064] Step S201, obtaining the target data identifier and target operation type of the data to be operated.

[0065] For a detailed explanation of the computing layer and storage layer in the embodiment of the present application, please refer to the aforementioned embodiment and will not be repeated here.

[0066] In the embodiments of the present application, the data to be operated include but are not limited to data rows and indexes, and the target operation type include but are not limited to read, write and delete operations. More finely granularly, the read operation includes a query (select) operation, and the write operation includes any one of insert (insert), modify (update), and update (update). When the target operation type is a write operation, the computing layer also needs to obtain the data to be operated; the delete operation is delete (delete). Of course, the target operation type can also be other types, which are also not limited.

[0067] When the data to be operated is a data row, the target data identifier of the data to be operated may be a row identifier, and the row identifier may be a primary key of the data row; when the data to be operated is an index, the target data identifier of the data to be operated may be an identifier of the index.

[0068] The client can initiate an SQL request to the computing layer. The computing layer can obtain the target data identifier and target operation type of the data to be operated from the SQL (Structured Query Language) request. It can also convert the SQL request into a kv request and obtain the target data identifier and target operation type of the data to be operated from the kv request. There is no restriction on this.

[0069] In practical applications, since data rows and their indexes usually exist in the form of key-value pairs in storage nodes or data shards of storage nodes, after obtaining the SQL request initiated by the client, the computing layer can convert the SQL request into a kv (key-value) request through the parser, optimizer, and executor. The data to be operated in the kv request can be in the form of a key-value pair, which can be a data row key-value pair or an index key-value pair, and the target data identifier can be the key of the key-value pair.

[0070] A data row key-value pair refers to a data row stored in a data table in the form of a key-value pair. The key of each data row key-value pair includes the row identifier of the corresponding data row, and the value is the column value of each column in the corresponding data row. The key of an index key-value pair includes the table identifier of the data table, the column identifier of the corresponding index column, and the column value of the corresponding data row in the corresponding index column, and the value includes the row identifier of the corresponding data row.

[0071] Step S202: If it is determined that the target metadata required for the data to be operated is not cached locally, then the target first data interval where the target data identifier is located is determined from the first data intervals of each parallel execution unit pre-cached locally, and the parallel execution unit corresponding to the target first data interval is used as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer and is used to store metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard.

[0072] In the embodiment of the present application, each computing node can cache the metadata of the data shards accessed in the most recent period of time. The metadata of the data shards refers to the shard information of the data shards. The shard information includes the shard identifier, the data interval of the data stored in the data shard (hereinafter referred to as the second data interval), routing information, and data dictionary information of the data in the shard, etc. The embodiment of the present application does not impose any restrictions on this.

[0073] In the embodiment of the present application, the computing node can determine whether there is a data interval where the target data identifier is located in the second data interval of each data shard cached locally.

[0074] If there is a second data interval where the target data identifier is located, the data shard corresponding to the second data interval can be used as the target data shard, and the metadata of the target data shard can be obtained from the local cache. Through the metadata of the target data shard, the target operation type can be performed on the data to be operated in the target data shard.

[0075] If the second data interval where the target data identifier is located does not exist, it is necessary to determine whether the first data interval of each parallel execution unit in the metadata layer is cached locally. If so, the target first data interval where the target data identifier is located is directly determined from the first data intervals of each parallel execution unit pre-cached locally; if not, the main metadata management node of the metadata layer is accessed, and the first data interval of each parallel execution unit is obtained and cached from the main metadata management node. The main metadata management node is used to create at least one parallel execution unit meta-worker in each metadata node, set and store the first data interval of each parallel execution unit meta-worker, and in addition, it can also manage the first data interval of each parallel execution unit meta-worker.

[0076] The metadata layer also includes a metadata node cluster, which includes multiple metadata nodes. In actual applications, each metadata node has a corresponding metadata server. A metadata server can include at least one metadata node. The metadata server is a server used to store and manage metadata.

[0077] In the embodiment of the present application, each metadata node includes at least one pre-created parallel execution unit meta-worker. The number of parallel execution units in the metadata node cluster is usually 8-32. The parallel execution unit is a logical role. The parallel execution unit can be any one of the execution units such as process, child process and thread, and the embodiment of the present application does not impose any restrictions on this.

[0078] In the embodiment of the present application, each parallel execution unit has a corresponding first data interval, each parallel execution unit is bound to at least one data shard, each data shard has a uniquely bound parallel execution unit, and the first data interval of each parallel execution unit is the union interval of the second data intervals of each bound data shard. The second data interval of each data shard refers to the interval of data stored in each data shard. Both the first data interval and the second data interval can be key intervals, and the key interval refers to a range containing a series of keys (or values), and this range can be defined by two keys: a start key and an end key. Within this range, all keys fall between the start key and the end key, including the start key and the end key themselves.

[0079] Specifically, assume that the second data intervals of data shard 1, data shard 2, data shard 3, and data shard 4 are [a, c) (a is the start key, c is the end key), [c, d), [d, e), and [e, g), respectively, and assume that the first data interval of the parallel execution unit meta-worker1 is [a, g), then meta-worker1 can be bound to data shard 1-data shard 4.

[0080] After determining the target first data interval where the target data identifier is located, the embodiment of the present application uses the parallel execution unit corresponding to the target first data interval as the target parallel execution unit, obtains the routing information of the target parallel execution unit (characterizing the metadata node where the target parallel execution unit is located), and accesses the target parallel execution unit according to the routing information of the target parallel execution unit.

[0081] Step S203, according to the target data identifier, determine the target data shard from at least one data shard bound to the target parallel execution unit, and obtain the target metadata of the target data shard from the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer and is used to store the metadata of the bound data shard.

[0082] In the embodiment of the present application, each parallel processing unit is used to store metadata of bound data slices. After accessing each target parallel execution unit, the computing layer obtains the second data interval of at least one data slice bound to the target parallel execution unit, determines the target second data interval where the target data identification bit is located from the second data interval of at least one data slice, uses the data slice of the target second data interval as the target data slice, and obtains target metadata of the target data slice from the target parallel execution unit, wherein the target metadata includes routing information, the second data interval, and data dictionary information of the target data slice.

[0083] Step S204, performing an operation of the target operation type on the data to be operated in the target data slice according to the target metadata.

[0084] After obtaining the target metadata, the computing layer of the embodiment of the present application caches the target metadata, accesses the target data shard according to the routing information of the target data shard in the target metadata, performs the target operation type operation on the operation data in the target data shard, obtains the operation result (used to indicate whether the execution is successful), and returns the operation result to the client.

[0085] Specifically, when the target operation type is an insert operation, the data to be operated can be inserted into the target data shard according to the data dictionary information in the target metadata, and the operation result then represents whether the insertion is successful; when the target operation type is a delete type, the data to be operated can be deleted from the target data shard according to the data dictionary information in the target metadata, and the operation result then represents whether the deletion is successful; when the target operation type is an update type, the corresponding data can be modified according to the data dictionary information in the target metadata and the data to be operated, and the operation result then represents whether the modification is successful; when the target operation type is a query operation, the relevant data can be queried from the target data shard according to the data dictionary information in the target metadata, and the operation result then represents the queried data or the query is unsuccessful.

[0086] In the embodiment of the present application, at least one parallel execution unit is set in each metadata node of the metadata node cluster of the metadata layer, and each parallel execution unit respectively maintains the metadata of the corresponding data slice, and is not limited to a single main metadata node to provide metadata, which can improve management efficiency;

[0087] The metadata of data shards is jointly managed by multiple parallel execution units. Even if metadata of new data shards is added, it will not affect the operating efficiency of the system too much, thus enhancing the scalability of the system.

[0088] When the computing layer needs to obtain the target metadata, it only needs to interact with the target execution unit that stores the target metadata. Multiple parallel execution units can work simultaneously, which improves the throughput of the metadata layer. In addition, even if the target execution unit fails, it will not affect other parallel execution units, thereby enhancing the high availability of the system.

[0089] In an embodiment of the present application, a possible implementation method is provided to determine the target metadata required for the locally uncached data to be operated, including:

[0090] If the second data interval of the target data shard where the target data identifier is located is not cached locally, it is determined that the target metadata required for the data to be operated is not cached locally.

[0091] The above-mentioned embodiment has explained that if the computing node has locally cached the data interval where the target data identifier is located, it means that the computing node has recently accessed the target data shard where the target data identifier is located, and the metadata of the target data shard is locally cached, and the metadata of the target data shard can be directly obtained from the local cache. On the contrary, if the target data shard where the target data identifier is located has not been accessed recently, the second data interval of the target data shard where the target data identifier is located is not locally cached, and it can be determined that the target metadata required for the data to be operated is not locally cached.

[0092] In an embodiment of the present application, a possible implementation method is provided, which determines a target data slice from at least one data slice bound to a target parallel execution unit according to a target data identifier, including:

[0093] Obtaining a second data interval of at least one data shard bound to a target parallel execution unit, and determining a target second data interval where a target data identifier is located from the second data interval of at least one data shard;

[0094] The data shard of the target second data interval is used as the target data shard.

[0095] In the embodiment of the present application, each parallel execution unit stores metadata of at least one data shard bound to the parallel execution unit, the metadata of the data shard includes shard information of the corresponding data shard, the shard information includes the second data interval of the corresponding data shard, the computing node can obtain the second data interval of at least one data shard bound to the target parallel execution unit from the target parallel execution unit, determine the target second data interval where the target data identifier is located from the second data interval of at least one data shard, and use the data shard corresponding to the target second data interval as the target data shard.

[0096] An embodiment of the present application provides a possible implementation method, which determines the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally, and also includes:

[0097] The computing layer obtains and caches the first data interval of all parallel execution units from the main metadata management node;

[0098] Among them, the main metadata management node is located at the metadata layer, and the main metadata management node is used to create at least one parallel execution unit in each metadata node, and set and store the first data interval of each parallel execution unit.

[0099] The metadata layer in the embodiment of the present application includes a metadata management layer, the metadata management layer includes a metadata management node cluster, the metadata management node cluster includes at least three metadata management nodes meta-managers (usually 3, 3 can meet the high availability of the metadata management nodes), and the at least three metadata management nodes include a master metadata management node and at least two slave metadata management nodes.

[0100] At least three metadata management nodes follow the replica synchronization algorithm. At least three metadata management nodes actively elect a master metadata management node after startup. The master metadata management node can create at least one parallel execution unit in at least each metadata node. Each parallel execution unit independently serves a part of storage nodes and a part of data shards. The master metadata management node can set and store the first data interval of each parallel execution unit, and other slave metadata management nodes can also store the first data interval of each parallel execution unit. However, only the master metadata management node provides metadata to the outside (to the computing layer and storage layer, etc.), and the slave metadata management node does not provide metadata to the outside.

[0101] like Figure 3 As shown, it exemplarily shows a flow chart of another data processing method, which includes the following steps:

[0102] Step S301, the client initiates a SQL request to a computing node in the computing layer;

[0103] Step S302: The computing node converts the SQL request into a kv request, which includes a target data identifier of the data to be operated and a target operation type; the data to be operated here is a key-value pair to be operated, which can be a data row key-value pair or an index key-value pair, the target data identifier can be a key of the key-value pair to be operated, and the target operation type can be any one of read, write, delete and query;

[0104] Step S303, the computing node determines whether the target metadata required by the data to be operated is cached locally; if so, step S308 is executed; if not, step S304 is executed;

[0105] Step S304, the computing node determines whether the first data interval of each parallel execution unit in the metadata layer is cached locally, if so, executing step S305; if not, executing step S306;

[0106] Step S305, the computing node determines the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally, and uses the parallel execution unit corresponding to the target first data interval as the target parallel execution unit; executing step S307;

[0107] Step S306, the computing node accesses the main metadata management node of the metadata layer, obtains and caches the first data interval of each parallel execution unit from the metadata main management node; executes step S305;

[0108] Step S307, the computing node communicates with the corresponding target parallel execution unit, determines the target data slice from at least one data slice bound to the target parallel execution unit according to the target data identifier, and obtains and caches the target metadata of the target data slice from the target parallel execution unit;

[0109] Step S308, the computing node performs an operation of the target operation type on the data to be operated in the target data shard according to the target metadata, and obtains an operation result;

[0110] Step S309: The computing node returns the operation result to the client.

[0111] In an embodiment of the present application, a possible implementation method is provided, in which the master metadata management node creates at least one parallel execution unit in each metadata node, including:

[0112] The master metadata node obtains the load of the storage layer, and determines a first number of parallel execution units to be created according to the load of the storage layer;

[0113] The master metadata management node obtains a second number of metadata nodes in the metadata node cluster, and determines a third number of parallel execution units in each metadata node according to a ratio of the first number to the second number;

[0114] The main metadata management node sends a creation instruction to each metadata node, where the creation instruction is used to instruct each metadata node to create a third number of parallel execution units locally.

[0115] In the embodiment of the present application, the master metadata management node considers the load of the storage layer when creating each parallel execution unit in each metadata node. The load of the storage layer usually refers to the workload and pressure that the storage system bears when processing data storage and access. The storage load is usually positively correlated with the number of tables in the storage layer, the number of data rows in the table, and the number of indexes. The load of the metadata layer can be determined based on the load of the storage layer. The load of the metadata layer refers to the workload used to manage and maintain the data structure and information in the storage system. The load of the metadata layer is also positively correlated with the load of the storage layer. Therefore, the load of the metadata layer can be determined based on the load of the storage layer.

[0116] In addition, at least one preset indicator of the metadata layer needs to be obtained; the at least one preset indicator includes at least one of the metadata access rate, metadata storage capacity, metadata service response time, and the number of concurrent connections of the metadata service. The first number of parallel execution units required is determined in combination with the load of the metadata layer and these at least one preset indicator. The first number is usually 8-32.

[0117] The metadata access rate includes the frequency of metadata reading, writing, updating, and deleting operations.

[0118] The metadata storage capacity includes the usage of metadata storage space.

[0119] The metadata service response time includes the average response time and maximum response time of metadata operations.

[0120] The number of concurrent connections of the metadata service includes information such as the current number of connections and the peak number of connections.

[0121] In order to make the parallel execution units evenly distributed in the metadata node cluster, the main metadata management node obtains the second number of metadata nodes in the metadata node cluster, and determines the third number of parallel execution units in each metadata node based on the ratio of the first number to the second number. The third number can be any value from ratio -i (ratio -i is greater than 1) to ratio +i (usually any one of ratio -1, ratio and ratio +1).

[0122] After determining the third number of parallel execution units in each metadata node, the main metadata management node sends a creation instruction to each metadata node. The creation instruction is used to instruct each metadata node to create the third number of parallel execution units locally. After receiving the creation instruction, each metadata node creates the third number of parallel execution units locally and returns a response result. The response result is used to indicate whether the creation is successful.

[0123] The number of parallel execution units created in the embodiment of the present application meets the load of the metadata layer, and the parallel execution units are evenly distributed in each metadata node. Compared with the existing solution that only has one metadata node providing metadata services, creating a parallel execution unit in each metadata node allows each metadata node to participate in providing metadata services, which is conducive to improving data management efficiency.

[0124] An embodiment of the present application provides a possible implementation method, in which the master metadata management node sets the first data interval of each parallel execution unit, and further includes:

[0125] For each parallel execution unit, the master metadata management node uses the data shard whose second data interval is within the first data interval of the parallel execution unit as the data shard corresponding to the parallel execution unit;

[0126] The master metadata management node binds each data shard to a corresponding parallel execution unit, and configures each parallel execution unit to cache the metadata of the data shard bound to it.

[0127] The master metadata management node in the embodiment of the present application can, for each parallel execution unit, use the data shard whose second data interval is located in the first data interval of the parallel execution unit as the data shard corresponding to the parallel execution unit, bind each data shard to the corresponding parallel execution unit so that the two are in a binding relationship, and configure each parallel execution unit to cache the metadata of the data shard bound to it. This allows each parallel execution unit to independently manage the metadata of the data shard bound to it, and is not limited to one master metadata node to provide metadata services, thereby enhancing the scalability, management efficiency and throughput of the system.

[0128] A possible implementation method is provided in an embodiment of the present application, and the method further includes:

[0129] The master metadata management node determines at least one first execution unit to be migrated from the first metadata node in response to obtaining that the load of the first metadata node exceeds the first preset load and that there is a faulty execution unit in the first metadata node, and migrates at least one first parallel execution unit to the second metadata node; the load of the second metadata node is less than the second preset load, and the second preset load is less than the first preset load;

[0130] Wherein, when the load of the first metadata node exceeds the first preset load, at least one first execution unit is the parallel execution unit with the largest load in the first metadata node;

[0131] When a faulty execution unit exists in the first metadata node, at least one first execution unit is a faulty execution unit in the first metadata node.

[0132] The embodiment of the present application also supports the migration of parallel execution units. When the main metadata management node can monitor the parallel execution units through the heartbeat information of the parallel execution units, the heartbeat information of the parallel execution units includes the unit identification, operating status, routing information and load (characterizing the amount of metadata in the parallel execution units) of the parallel execution units.

[0133] The master metadata management node can grasp the operation and load status of each parallel execution unit based on the received heartbeat information of each parallel execution unit, and can also grasp the operation and load status of each metadata node. When any of the following situations exists, at least one first execution unit to be migrated is determined from the first metadata node (any metadata node in the metadata node cluster):

[0134] (1) When the load of the first metadata node exceeds the first preset load (for example, 90M), the parallel execution unit with the largest load in the first metadata node will be determined and used as the first execution unit to be migrated; the load of the metadata node refers to the amount of metadata in the metadata node. The larger the amount of metadata data, the larger the load of the metadata node, and the two are positively correlated; at least one first parallel execution unit can be migrated to the second metadata node so that the load of each metadata node is not excessive, the load of the second metadata node is less than the second preset load (for example, 40M), and the second preset load is less than the first preset load.

[0135] (2) When there is a faulty execution unit in the first metadata node, the faulty execution unit is used as the first execution unit to be migrated. It is worth noting that when the first metadata node fails, all parallel execution units in the first metadata node cannot provide metadata to the outside world. In this case, all parallel execution units in the first metadata node are faulty execution units.

[0136] like Figure 4 As shown, it exemplarily shows a schematic diagram of the operation process of the metadata management node cluster, including the following steps:

[0137] At least three metadata management nodes meta-managers in the metadata management node cluster meta-manager group are started, and at least three metadata management nodes meta-managers elect a primary metadata management node meta-manager leader to start service. The meta-manager leader instructs each metadata node to create a corresponding third number of parallel execution units meta-workers.

[0138] The meta-manager leader continuously monitors the heartbeat information of all meta-workers to understand the operating status and load of all parallel execution units and all metadata node meta-servers. For each currently received meta-worker heartbeat information, the meta-manager leader determines whether the meta-worker is running normally. If not (indicating that it is a faulty execution unit), the meta-worker is destroyed and a new meta-worker is created in another metadata node meta-server (referring to the second metadata node) to take over the abnormally running meta-worker; if so, the metadata node meta-server where the parallel execution unit meta-worker is located is determined.

[0139] The meta-manager leader can also obtain the load of the meta-server based on the load of the parallel execution units contained in each metadata node meta-server. Specifically, after receiving the heartbeat information of each parallel execution unit meta-worker, the metadata node meta-server where the parallel execution unit meta-worker is located is determined, and whether the load of the metadata node meta-server exceeds the first preset load. If so, the meta-worker with the largest load is deleted in the meta-server, and a new meta-worker is created in other meta-servers. The new meta-worker is used to take over the service of the meta-worker with the largest load. After the creation is completed, it is determined that the metadata node cluster is operating normally as of the current moment. If not (the load of the metadata node meta-server does not exceed the first preset load), it is determined that the metadata node cluster is operating normally as of the current moment.

[0140] The embodiment of the present application migrates at least one first parallel execution unit to be migrated to the second metadata node. The process of migrating the first parallel execution unit does not affect the provision of metadata to the outside by other parallel execution units, thereby enhancing the high availability of the metadata layer.

[0141] In an embodiment of the present application, a possible implementation method is provided, in which the main metadata management node migrates at least one first parallel execution unit to the second metadata node, including:

[0142] The main metadata management node creates a second execution unit corresponding to the first execution unit in the second metadata node, and the second execution unit and the corresponding first execution unit have the same unit identifier and first data interval;

[0143] The master metadata management node releases the binding between the first execution unit and the corresponding at least one first data shard, deletes the first execution unit, binds the second execution unit and the at least one first data shard, and configures the second execution unit to store metadata of the at least one first data shard.

[0144] The main metadata management node migrates at least one first parallel execution unit to the second metadata node specifically in the following manner: a second execution unit corresponding to the first execution unit can be created in the second metadata node, the second execution unit and the corresponding first execution unit have the same unit identifier and first data interval, the binding between the first execution unit and the corresponding at least one first data shard is released, the first execution unit is deleted, and the second execution unit is bound to the at least one first data shard, and the second execution unit is configured to store metadata of the at least one first data shard, thereby realizing the migration of the second parallel execution unit.

[0145] In an embodiment of the present application, a possible implementation method is provided, where the metadata management node is also used to store routing information of each parallel execution unit; the routing information of the parallel execution unit is used to indicate the metadata node where the parallel execution unit is located;

[0146] The metadata management node configures the second execution unit to store metadata of at least one first data shard, and then further includes:

[0147] The metadata management node updates the stored routing information of the first execution unit to new routing information, where the new routing information is used to indicate the metadata node where the second execution unit is located.

[0148] The above-mentioned embodiment has explained that the metadata management node is also used to store the routing information of each parallel execution unit. The routing information of the parallel execution unit is used to indicate the metadata node where the parallel execution unit is located. After the metadata management node configures the second execution unit to store the metadata of at least one first data shard, it is also necessary to update the stored routing information of the first execution unit to new routing information. The new routing information is used to indicate the metadata node where the second execution unit is located, that is, to indicate the second metadata node. When the computing layer subsequently accesses the metadata management node, it obtains and caches the new routing information.

[0149] A possible implementation method is provided in an embodiment of the present application, where the master metadata management node also includes routing information of each parallel execution unit;

[0150] The method also includes:

[0151] Each data shard is also used to respond to the current moment as the first reporting moment, if it is determined that the first routing information is locally cached, and the first routing information is the routing information of the parallel execution unit bound to the data shard, then report the first heartbeat information to the parallel execution unit bound to the data shard according to the first routing information; the interval between two adjacent first reporting moments is a first preset time length;

[0152] If the data shard determines that the first routing information is not cached locally, the data shard obtains and caches the first routing information from the primary metadata management node, and reports the first heartbeat information to the parallel execution unit bound to the data shard according to the first routing information;

[0153] Each parallel execution unit is also used to receive the first heartbeat information of at least one data shard bound to it. For each data shard, if the parallel execution unit determines that the data shard is faulty based on the first heartbeat information, the faulty data shard is repaired or a backup shard of the data shard is enabled.

[0154] After each data shard is started, the embodiment of the present application can also periodically report its first heartbeat information to the bound parallel execution unit. The first heartbeat information represents the running state of the corresponding data shard, and the running state includes a normal running state and a fault state. Figure 5 As shown, the schematic diagram of the exemplary process of each data slice reporting its own first heartbeat information includes the following steps:

[0155] After the data sharding of the embodiment of the present application is started, the current moment is waited for as the first reporting moment, and the heartbeat process is started. When the data sharding exists in the replica synchronization group, the data sharding that reports the first heartbeat information is usually the primary data sharding. The first reporting moment is the heartbeat information reporting moment. The interval between two adjacent first reporting moments is a first preset time length, thereby achieving periodic reporting. The data sharding will determine whether the first routing information is cached locally at each first reporting moment; the first routing information is the routing information of the parallel execution unit bound to the data sharding.

[0156] If the first routing information exists, the first heartbeat information is reported to the parallel execution unit bound to the data shard according to the first routing information.

[0157] If the first routing information does not exist, the first routing information is obtained and cached from the primary metadata management node, and the first heartbeat information is reported to the parallel execution unit bound to the data shard according to the first routing information.

[0158] After the corresponding parallel execution unit receives the first heartbeat information, for each data shard, the parallel execution unit determines whether the data shard is faulty based on the first heartbeat information. If so, the faulty data shard is repaired (the preset repair code can be called for repair, or it can be repaired manually), or the backup shard of the data shard is enabled, and the backup shard of the data shard has the same data as the data shard; if not, wait for the next first reporting time.

[0159] The embodiment of the present application can realize that each parallel execution unit worker separately manages the first heartbeat information of the bound data shards. The parallel execution units are independent of each other. Even if one parallel execution unit fails, it will not affect the normal management of the bound data shards by other parallel execution units.

[0160] In an embodiment of the present application, a possible implementation method is provided, wherein the main metadata management node further includes routing information of each parallel execution unit; the storage layer further includes multiple storage nodes;

[0161] Each storage node is also used for reporting a second heartbeat message to the parallel execution unit having a preset corresponding relationship with the storage node according to the second routing information in response to the current moment being the second reporting moment, if the storage node determines that the local cache has second routing information, and the second routing information is routing information of the parallel execution unit having a preset corresponding relationship with the storage node; the interval between two adjacent second reporting moments is a second preset time length;

[0162] If the storage node determines that the second routing information is not cached locally, it obtains and caches the second routing information from the primary metadata management node, and reports the second heartbeat message to the parallel execution unit having a preset corresponding relationship with the storage node based on the second routing information.

[0163] Each parallel execution unit is also used to receive second heartbeat information of at least one storage node corresponding thereto. For each storage node, if the parallel execution unit determines that the storage node is faulty according to the second heartbeat information, the storage node is repaired or a backup node of the storage node is enabled.

[0164] After startup, each storage node in the embodiment of the present application also needs to periodically report its own second heartbeat information to the parallel execution unit that has a corresponding relationship with it. The second heartbeat information includes the identification of the storage node, the operating status and load status of the corresponding storage node. The operating status of the storage node includes normal operating status and fault status, and the load status includes the network status of the storage node, disk IO and throughput, the amount of data on the storage node and the number of data shards, etc.

[0165] like Figure 6 As shown, the schematic diagram of the exemplary process of each storage node reporting its own second heartbeat information includes the following steps:

[0166] After the storage node in the embodiment of the present application is started, a parallel execution unit corresponding to the storage node is determined.

[0167] A possible implementation method is provided in an embodiment of the present application. A storage node determines a parallel execution unit with which a preset corresponding relationship exists in the following manner:

[0168] Obtaining a first number of all parallel execution units and unit identifiers of all parallel execution units from a master metadata node;

[0169] Based on the order from large to small or from small to large, all parallel execution units are sorted according to the unit identifiers of all parallel execution units to obtain a sorting result;

[0170] Perform a modulo operation on its own node identifier and the first quantity to obtain a target remainder value; and use the parallel execution units in the sorting result with the same sorting order as the target remainder value as the parallel execution units corresponding to the storage nodes.

[0171] Specifically, the storage node may obtain the first number of all parallel execution units and the unit identification meta-worker ID of all parallel execution units from the master metadata node, and the unit identification meta-worker ID may uniquely identify each parallel execution unit. All parallel execution units may be sorted in order from large to small or from small to large according to the unit identification of all parallel execution units to obtain a sorting result, and the sorting result is 0-1-2-...-(m-1), where m is the first number.

[0172] Its own node identifier can be obtained. The node identifier of the storage node can uniquely represent the storage node. Its own node identifier and the first quantity can be subjected to a modulo operation to obtain a target remainder value. Specifically, assuming that the first quantity of meta-workers is m and the node identifier of the storage node is storeID, then the target remainder value i=storeID Mod m. Then the range of the target remainder value i is [0, m-1], where m is the first quantity and i is a positive integer.

[0173] After obtaining the target remainder value, the parallel execution units in the sorting result whose sorting order is the same as the target remainder value can be used as the parallel execution units that have a corresponding relationship with the storage node. Assuming that the target remainder value obtained after modulo operation of the node identifier and the first quantity of a storage node is 5, the 5th parallel execution unit in the sorting result can be used as the parallel execution unit that has a corresponding relationship with the storage node.

[0174] After the storage node determines the parallel execution unit with which it has a corresponding relationship, it waits for the current moment to be the second reporting moment and starts to execute the heartbeat process. The second reporting moment is the heartbeat information reporting moment of the storage node. The interval between two adjacent second reporting moments is a second preset time length, thereby realizing periodic reporting. The storage node determines whether the second routing information is cached locally at each second reporting moment. The second routing information is the routing information of the parallel execution unit with which the storage node has a preset corresponding relationship.

[0175] If the second routing information exists, the second heartbeat information is reported to the parallel execution unit corresponding to the storage node according to the second routing information.

[0176] If the second routing information does not exist, the second routing information is obtained and cached from the primary metadata management node, and according to the second routing information, a second heartbeat message is reported to a parallel execution unit that has a preset corresponding relationship with the storage node.

[0177] After the corresponding parallel execution unit receives the second heartbeat information, for each storage node, the parallel execution unit determines whether the storage node is faulty based on the second heartbeat information. If so, the faulty storage node is repaired (the preset repair code can be called for repair, or it can be repaired manually), or a backup node of the storage node can be enabled, and the backup node has the same data as the original storage node.

[0178] The embodiment of the present application can realize that each parallel execution unit worker separately manages the second heartbeat information of the bound storage node. The parallel execution units are independent of each other. Even if one parallel execution unit fails, it will not affect the normal management of the bound storage nodes by other parallel execution units.

[0179] Figure 7 A schematic diagram of a system architecture for implementing a data processing method in a distributed database system provided in an embodiment of the present application, wherein the distributed database system includes a computing layer, a storage layer, and a metadata layer.

[0180] The computing layer includes multiple computing nodes, namely computing node 1, computing node 2, etc.

[0181] The storage layer includes multiple storage nodes including storage node 1, storage node 2, storage node 3, storage node 4, etc. Each storage node includes several data shard regions, as described above. Figure 1 The same as the example, Figure 7In the embodiment shown, the data shards are also multiple copies. When the computing node writes data to the shards, the multiple copies of the same data shard synchronize data through a consistency protocol or algorithm (also called a copy synchronization algorithm, such as Paxos, Raft, etc.). The multiple copies of the shards include the shard master copy and the shard slave copy. Each data shard group is usually configured as a three-copy mode. Assuming that each storage node includes 3 data shards, each data shard group also includes 3 data shards. Assuming that each data shard in storage node 1 is: data shard a1 (master), data shard a2 (slave), data shard a3 (slave); each data shard in storage node 2 is data shard a1 (slave), data shard a2 (master), data shard a4 (slave); each data shard in storage node 3 is data shard a1 (slave), data shard a3 (master), data shard a4 (slave); each data shard in storage node 4 is data shard a2 (slave), data shard a3 (slave), data shard a4 (master).

[0182] Assuming that data shards with the same shard identifier (assuming a1, a2, a3 and a4 are shard identifiers) belong to one data shard group, then data shard a1 (master) in storage node 1, data shard a1 (slave) in storage node 2 and data shard a1 (slave) in storage node 3 belong to one data shard group. Other data shard groups are not given examples here one by one. In general, each data shard group also follows the replica synchronization algorithm, including one master shard and multiple slave shards.

[0183] The metadata layer includes the metadata management layer and the metadata working layer.

[0184] The metadata management layer includes at least three metadata management nodes meta-manager, and the at least three metadata management nodes include a master metadata management node meta-manager leader and at least two slave metadata management nodes meta-manager followers.

[0185] The metadata working layer includes a metadata node cluster, which includes multiple metadata node meta-servers, namely metadata node 1 (meta-server1), metadata node 2 (meta-server2), metadata node 3 (meta-server3), metadata node 4 (meta-server4),..., each metadata node includes at least one parallel execution unit meta-worker, wherein meta-server1 includes parallel execution unit 1 (meta-worker1) and parallel execution unit 5 (meta-worker5), meta-server2 includes parallel execution unit 2 (meta-worker2) and parallel execution unit 6 (meta-worker6), meta-server3 includes parallel execution unit 3 (meta-worker3) and parallel execution unit 7 (meta-worker7), and meta-server4 includes parallel execution unit 4 (meta-worker4) and parallel execution unit 8 (meta-worker8).

[0186] The metadata management layer can manage metadata nodes and unit information of each parallel execution unit, and the unit information includes unit identification, routing information, and first data interval, etc. The computing nodes can access each parallel execution unit separately, for example, computing node 1 accesses parallel execution unit 1, and computing node 2 accesses parallel execution unit 2 at the same time.

[0187] Each data shard (or data shard group) is uniquely bound to a parallel execution unit. Each parallel execution unit independently manages the heartbeat information of at least one bound data shard (or data shard group). The primary shard in each data shard group reports the first heartbeat information to the bound parallel execution unit. Assume that meta-worker1 is bound to the data shard group where data shard a1 (primary) is located, then data shard a1 (primary) will report its first heartbeat information to meta-worker1; meta-worker6 is bound to the data shard group where data shard a2 (primary) is located, then data shard a2 (primary) will report its first heartbeat information to meta-worker6; meta-worker7 is bound to the data shard group where data shard a3 (primary) is located, then data shard a3 (primary) will report its first heartbeat information to meta-worker7; meta-worker8 is bound to the data shard group where data shard a4 (primary) is located, then data shard a4 (primary) will report its first heartbeat information to meta-worker8.

[0188] Each storage node has a corresponding parallel execution unit, and each parallel execution unit manages the second heartbeat information of the storage node with which it has a corresponding relationship. Assuming that storage node 1 has a corresponding relationship with parallel execution unit meta-worker1, storage node 1 reports the second heartbeat information to meta-worker1; assuming that storage node 2 has a corresponding relationship with parallel execution unit meta-worker2, storage node 2 reports the second heartbeat information to meta-worker2; storage node 3 has a corresponding relationship with parallel execution unit meta-worker3, storage node 3 reports the second heartbeat information to meta-worker3; storage node 4 has a corresponding relationship with parallel execution unit meta-worker4, storage node 4 reports the second heartbeat information to meta-worker4.

[0189] The data shard reports the first heartbeat information to the parallel execution unit bound to it, and the storage node reports the second heartbeat information to the parallel execution unit with which it has a corresponding relationship, which can greatly improve the concurrency and throughput of the system, and also enhance the horizontal expansion capability of the storage node cluster in the storage layer. The expansion capability of the storage node is proportional to the number of parallel execution units. To support ultra-large-scale storage node clusters, it is only necessary to configure enough parallel execution units that can serve simultaneously in the metadata node cluster.

[0190] The computing node can obtain and cache the first data interval of all parallel execution units from the main metadata management node in advance. Each parallel execution unit includes the metadata of at least one data shard bound to it. The computing node can subsequently access the meta-worker of each parallel execution unit to obtain the required target metadata. Through multiple meta-workers serving simultaneously, each meta-worker is responsible for the storage and maintenance of a part of the metadata, avoiding the high load of the unit data node service and enabling rapid response to metadata read and write requests.

[0191] In addition, by configuring several meta-workers that can provide services simultaneously in the metadata layer, each meta-worker is responsible for managing a portion of storage nodes and data shards, enabling all metadata nodes to serve simultaneously, greatly reducing the load on a single metadata node and making full use of all metadata node resources. This can support ultra-large-scale storage node clusters and also enable the metadata layer to have efficient low IO latency and high throughput capabilities.

[0192] In addition, when a metadata node fails, other metadata nodes can still provide services normally. You only need to create parallel execution units in the failed metadata node in the non-faulty metadata node, so that the non-faulty metadata node can take over the services of the failed metadata node. Therefore, during the period of taking over the services of the failed metadata node, only the metadata corresponding to the failed metadata point cannot be accessed normally, and most of the other data can be accessed normally, so the availability of the cluster is increased in the failure scenario.

[0193] The embodiment of the present application provides a data processing device, which is applied to a distributed database system. The distributed database system includes a computing layer, a storage layer, and a metadata layer. The metadata layer includes a management node and a metadata node cluster. The device is located in the computing layer, such as Figure 8 As shown, the data processing device 80 includes:

[0194] A first obtaining module 810 is used to obtain a target data identifier and a target operation type of the data to be operated;

[0195] The target parallel execution unit determination module 820 is used to determine the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally if it is determined that the target metadata required for the data to be operated is not cached locally, and use the parallel execution unit corresponding to the target first data interval as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer, and is used to store the metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard;

[0196] A target data shard determination module 830 is configured to determine a target data shard from at least one data shard bound to a target parallel execution unit according to a target data identifier, and obtain target metadata of the target data shard from the target parallel execution unit;

[0197] Used to perform target operation type operations on the target data shards according to the target metadata.

[0198] A possible implementation method is provided in an embodiment of the present application, and the target parallel execution unit determination module is specifically used to determine the target metadata required for the locally uncached data to be operated if the second data interval of the target data shard where the target data identifier is located is not cached locally.

[0199] A possible implementation method is provided in an embodiment of the present application, and the target data fragmentation determination module includes:

[0200] The target data shard determination submodule is used to obtain the second data interval of at least one data shard bound to the target parallel execution unit, determine the target second data interval where the target data identifier is located from the second data interval of at least one data shard; and use the data shard of the target second data interval as the target data shard.

[0201] A possible implementation method is provided in an embodiment of the present application, wherein the device further includes a first cache module, which is used to obtain and cache the first data interval of all parallel execution units from the master metadata management node;

[0202] Among them, the main metadata management node is located at the metadata layer, and the main metadata management node is used to create at least one parallel execution unit in each metadata node, and set and store the first data interval of each parallel execution unit.

[0203] In an embodiment of the present application, a possible implementation method is provided, in which the master metadata management node is used to create at least one parallel execution unit in each metadata node in the following manner: the master metadata node obtains the load of the storage layer, and determines a first number of parallel execution units to be created according to the load of the storage layer;

[0204] The master metadata management node obtains a second number of metadata nodes in the metadata node cluster, and determines a third number of parallel execution units in each metadata node according to a ratio of the first number to the second number;

[0205] The main metadata management node sends a creation instruction to each metadata node, where the creation instruction is used to instruct each metadata node to create a third number of parallel execution units locally.

[0206] A possible implementation method is provided in an embodiment of the present application, in which the master metadata management node is used to set the first data interval of each parallel execution unit in the following manner: for each parallel execution unit, the master metadata management node uses the data shard whose second data interval is located in the first data interval of the parallel execution unit as the data shard corresponding to the parallel execution unit;

[0207] The master metadata management node binds each data shard to a corresponding parallel execution unit, and configures each parallel execution unit to cache the metadata of the data shard bound to it.

[0208] A possible implementation method is provided in an embodiment of the present application, where the master metadata management node is further used to determine at least one first execution unit to be migrated from the first metadata node in response to obtaining that the load of the first metadata node exceeds the first preset load and that there is a faulty execution unit in the first metadata node, and migrate at least one first parallel execution unit to the second metadata node; the load of the second metadata node is less than the second preset load, and the second preset load is less than the first preset load;

[0209] Wherein, when the load of the first metadata node exceeds the first preset load, at least one first execution unit is the parallel execution unit with the largest load in the first metadata node;

[0210] When there is a faulty execution unit on the first metadata node, at least one first execution unit is the faulty execution unit on the first metadata node.

[0211] A possible implementation method is provided in an embodiment of the present application, and the main metadata management node migrates at least one first parallel execution unit to the second metadata node in the following manner: the main metadata management node creates a second execution unit corresponding to the first execution unit in the second metadata node, and the second execution unit and the corresponding first execution unit have the same unit identifier and first data interval; the main metadata management node releases the binding between the first execution unit and the corresponding at least one first data shard, deletes the first execution unit, binds the second execution unit and the at least one first data shard, and configures the second execution unit to store metadata of the at least one first data shard.

[0212] In an embodiment of the present application, a possible implementation method is provided, where the metadata management node is also used to store routing information of each parallel execution unit; the routing information of the parallel execution unit is used to indicate the metadata node where the parallel execution unit is located;

[0213] The metadata management node configures the second execution unit to store metadata of at least one first data shard, and is then used to update the stored routing information of the first execution unit to new routing information, where the new routing information is used to indicate the metadata node where the second execution unit is located.

[0214] In an embodiment of the present application, a possible implementation method is provided, where the master metadata management node also includes routing information of each parallel execution unit; each data shard is further used to respond to the current moment as the first reporting moment, if it is determined that the local cache has the first routing information, and the first routing information is the routing information of the parallel execution unit bound to the data shard, then according to the first routing information, report the first heartbeat information to the parallel execution unit uniquely bound to the data shard; the interval between two adjacent first reporting moments is a first preset time length;

[0215] The data shard is used to obtain and cache the first routing information from the primary metadata management node if it is determined that the first routing information is not cached locally, and report the first heartbeat information to the parallel execution unit bound to the data shard according to the first routing information;

[0216] Each parallel execution unit is also used to receive the first heartbeat information of at least one data shard bound to it. For each data shard, if the parallel execution unit determines that the data shard is faulty based on the first heartbeat information, the faulty data shard is repaired or a backup shard of the data shard is enabled.

[0217] In an embodiment of the present application, a possible implementation method is provided, wherein the main metadata management node further includes routing information of each parallel execution unit; the storage layer further includes multiple storage nodes;

[0218] Each storage node is also used for reporting a second heartbeat message to the parallel execution unit having a preset corresponding relationship with the storage node according to the second routing information in response to the current moment being the second reporting moment, if the storage node determines that the local cache has second routing information, and the second routing information is routing information of the parallel execution unit having a preset corresponding relationship with the storage node; the interval between two adjacent second reporting moments is a second preset time length;

[0219] The storage node is used to obtain and cache the second routing information from the primary metadata management node if it is determined that the second routing information is not cached locally, and report the second heartbeat message to the parallel execution unit having a preset corresponding relationship with the storage node according to the second routing information;

[0220] Each parallel execution unit is also used to receive second heartbeat information of at least one storage node corresponding thereto. For each storage node, if the parallel execution unit determines that the storage node is faulty according to the second heartbeat information, the storage node is repaired or a backup node of the storage node is enabled.

[0221] A possible implementation method is provided in an embodiment of the present application, and a storage node is used to determine the parallel execution units that have a preset corresponding relationship with it in the following manner: obtaining a first number of all parallel execution units and unit identifiers of all parallel execution units from a main metadata node; sorting all parallel execution units according to the unit identifiers of all parallel execution units in order from large to small or from small to large to obtain a sorting result; performing a modulo operation on its own node identifier and the first number to obtain a target remainder value; and taking the parallel execution units in the sorting result with the same sorting order as the target remainder value as the parallel execution units that have a corresponding relationship with the storage node.

[0222] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0223] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0224] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the above-mentioned data processing method.

[0225] In an alternative embodiment, an electronic device is provided, such as Fig. 9 As shown, Fig. 9 The electronic device 9000 shown includes: a processor 9001 and a memory 9003. The processor 9001 and the memory 9003 are connected, such as through a bus 9002. Optionally, the electronic device 9000 may also include a transceiver 9004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 9004 is not limited to one, and the structure of the electronic device 9000 does not constitute a limitation on the embodiments of the present application.

[0226] Processor 9001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 9001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0227] The bus 9002 may include a path to transmit information between the above components. The bus 9002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 9002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0228] The memory 9003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0229] The memory 9003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 9001. The processor 9001 is used to execute the computer program stored in the memory 9003 to implement the steps shown in the above method embodiment.

[0230] Among them, the electronic equipment package may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0231] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0232] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0233] The embodiments of the present application also provide a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiments when executed by a processor. The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate so that the embodiments of the present application described herein can be implemented in an order other than the diagram or text description.

[0234] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0235] The above are only optional implementation methods for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. A data processing method, characterized in that: Applied to a distributed database system, the distributed database system includes a computing layer, a storage layer and a metadata layer, the metadata layer includes a management node and a metadata node cluster, the method is executed by the computing layer, and the method includes: Obtaining a target data identifier and a target operation type of the data to be operated; If it is determined that the target metadata required for the data to be operated is not cached locally, the target first data interval where the target data identifier is located is determined from the first data intervals of each parallel execution unit pre-cached locally, and the parallel execution unit corresponding to the target first data interval is used as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer and is used to store metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard; According to the target data identifier, determine a target data shard from at least one data shard bound to the target parallel execution unit, and obtain target metadata of the target data shard from the target parallel execution unit; the target metadata refers to shard information of the target data shard, and the shard information includes data dictionary information and routing information; According to the target metadata, in the target data slice, an operation of a target operation type is performed on the data to be operated.

2. The method according to claim 1, characterized in that The determining that the target metadata required by the data to be operated is not cached locally includes: If the second data interval of the target data shard where the target data identifier is located is not cached locally, it is determined that the target metadata required for the data to be operated is not cached locally.

3. The method according to claim 1, characterized in that The step of determining the target data slice from at least one data slice bound to the target parallel execution unit according to the target data identifier includes: Acquire a second data interval of at least one data shard bound to the target parallel execution unit, and determine a target second data interval where the target data identifier is located from the second data interval of the at least one data shard; The data slice of the target second data interval is used as the target data slice.

4. The method according to claim 1, characterized in that: The step of determining the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally also includes: The computing layer obtains and caches the first data interval of all parallel execution units from the master metadata management node; The master metadata management node is located at the metadata layer, and is used to create at least one parallel execution unit in each metadata node, and to set and store the first data interval of each parallel execution unit.

5. The method according to claim 4, characterized in that The master metadata management node creates at least one parallel execution unit in each metadata node, including: The master metadata management node obtains the load of the storage layer, and determines a first number of parallel execution units to be created according to the load of the storage layer; The master metadata management node obtains a second number of metadata nodes in the metadata node cluster, and determines a third number of parallel execution units in each metadata node according to a ratio of the first number to the second number; The master metadata management node sends a creation instruction to each metadata node, where the creation instruction is used to instruct each metadata node to locally create a third number of parallel execution units.

6. The method according to claim 4, characterized in that The master metadata management node sets the first data interval of each parallel execution unit, and further includes: For each parallel execution unit, the master metadata management node uses the data shard whose second data interval is located in the first data interval of the parallel execution unit as the data shard corresponding to the parallel execution unit; The master metadata management node binds each data slice to a corresponding parallel execution unit, and configures each parallel execution unit to cache metadata of the data slice bound thereto.

7. The method according to claim 4, characterized in that The method further comprises: In response to obtaining any one of the above, that the load of the first metadata node exceeds the first preset load and that there is a faulty execution unit in the first metadata node, the master metadata management node determines at least one first execution unit to be migrated from the first metadata node, and migrates the at least one first parallel execution unit to the second metadata node; the load of the second metadata node is less than the second preset load, and the second preset load is less than the first preset load; Wherein, when the load of the first metadata node exceeds a first preset load, at least one first execution unit is a parallel execution unit with the largest load in the first metadata node; When there is a faulty execution unit in the first metadata node, at least one first execution unit is a faulty execution unit in the first metadata node.

8. The method according to claim 7, characterized in that The master metadata management node migrates the at least one first parallel execution unit to the second metadata node, including: The master metadata management node creates a second execution unit corresponding to the first execution unit in the second metadata node, and the second execution unit and the corresponding first execution unit have the same unit identifier and first data interval; The master metadata management node releases the binding between the first execution unit and the corresponding at least one first data shard, deletes the first execution unit, binds the second execution unit and the at least one first data shard, and configures the second execution unit to store metadata of the at least one first data shard.

9. The method according to claim 8, characterized in that The metadata management node is also used to store routing information of each parallel execution unit; the routing information of the parallel execution unit is used to indicate the metadata node where the parallel execution unit is located; The metadata management node configures the second execution unit to store metadata of the at least one first data shard, and then further includes: The metadata management node updates the stored routing information of the first execution unit to new routing information, where the new routing information is used to indicate the metadata node where the second execution unit is located.

10. The method according to claim 4, characterized in that The master metadata management node also includes routing information of each parallel execution unit; The method further comprises: Each data shard is further configured to, in response to the current moment being the first reporting moment, report first heartbeat information to the parallel execution unit uniquely bound to the data shard according to the first routing information if it is determined that the first routing information is locally cached and the first routing information is the routing information of the parallel execution unit bound to the data shard in response to the current moment being the first reporting moment; a first preset time interval is provided between two adjacent first reporting moments; If the data shard determines that the first routing information is not cached locally, the data shard obtains and caches the first routing information from the primary metadata management node, and reports the first heartbeat information to the parallel execution unit bound to the data shard according to the first routing information; Each parallel execution unit is also used to receive the first heartbeat information of at least one data shard bound to it. For each data shard, if the parallel execution unit determines that the data shard is faulty based on the first heartbeat information, the faulty data shard is repaired or a backup shard of the data shard is enabled.

11. The method according to claim 4, characterized in that The master metadata management node also includes routing information of each parallel execution unit; the storage layer also includes multiple storage nodes; Each storage node is further configured to, in response to the current moment being the second reporting moment, report a second heartbeat message to the parallel execution unit having a preset corresponding relationship with the storage node according to the second routing information if the storage node determines that the local cache has second routing information, and the second routing information is routing information of a parallel execution unit having a preset corresponding relationship with the storage node; and a second preset time interval is provided between two adjacent second reporting moments; If the storage node determines that the second routing information is not cached locally, it obtains and caches the second routing information from the primary metadata management node, and reports a second heartbeat message to a parallel execution unit that has a preset corresponding relationship with the storage node according to the second routing information; Each parallel execution unit is also used to receive second heartbeat information of at least one storage node corresponding to it. For each storage node, if the parallel execution unit determines that the storage node is faulty based on the second heartbeat information, the storage node is repaired or a backup node of the storage node is enabled.

12. The method according to claim 11, characterized in that The storage node determines the parallel execution unit with which there is a preset corresponding relationship in the following manner: Obtaining a first number of all parallel execution units and unit identifiers of all parallel execution units from a master metadata node; Based on the order from large to small or from small to large, all parallel execution units are sorted according to the unit identifiers of all parallel execution units to obtain a sorting result; Perform a modulo operation on its own node identifier and the first quantity to obtain a target remainder value; and use the parallel execution units in the sorting result having the same sorting order as the target remainder value as the parallel execution units corresponding to the storage nodes.

13. A data processing device, characterized in that: Applied to a distributed database system, the distributed database system includes a computing layer, a storage layer and a metadata layer, the metadata layer includes a management node and a metadata node cluster, the device is located in the computing layer, and the device includes: A first obtaining module is used to obtain a target data identifier and a target operation type of the data to be operated; A target parallel execution unit determination module is used to determine the target first data interval where the target data identifier is located from the first data intervals of each parallel execution unit pre-cached locally if it is determined that the target metadata required for the data to be operated is not cached locally, and use the parallel execution unit corresponding to the target first data interval as the target parallel execution unit; each parallel processing unit is bound to at least one data shard in the storage layer and is used to store metadata of the bound data shard; the first data interval of each parallel execution unit is the union interval of the second data interval of at least one bound data shard; a target data shard determination module, configured to determine a target data shard from at least one data shard bound to the target parallel execution unit according to the target data identifier, and obtain target metadata of the target data shard from the target parallel execution unit; the target metadata refers to shard information of the target data shard, and the shard information includes data dictionary information and routing information; An operation module is used to perform an operation of a target operation type on the data to be operated in the target data slice according to the target metadata.

14. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.