Data processing method and related apparatuses

The method uses Merkle trees for incremental metadata synchronization, reducing network traffic and memory consumption by parallel processing, thus enhancing synchronization efficiency in distributed systems.

WO2026007021A9PCT designated stage Publication Date: 2026-03-05HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/103306
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2026-03-05

AI Technical Summary

Technical Problem

Existing synchronization algorithms for distributed systems require significant network traffic and memory consumption due to the use of full updates and incremental updates, which can be inefficient in identifying differences between metadata across nodes.

Method used

A data processing method that utilizes incremental transmission of tree data by comparing metadata using Merkle trees, allowing parallel processing to reduce network traffic and memory consumption, and identifying differences efficiently.

Benefits of technology

The method reduces time and resources required to identify metadata differences, improving synchronization efficiency by minimizing network traffic and memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024103306_05032026_PF_FP_ABST
    Figure CN2024103306_05032026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a data processing method and related apparatuses. First tree data is obtained, the first tree data is determined while a first tree is built up according to first metadata of the first end, where the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure; second tree data is received from a second end, where the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second tree data includes a part of tree data corresponding to the second tree, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure; and a difference is identified between the first metadata and the second metadata by comparing the second tree data with the first tree data. By using the first tree and the second tree corresponding to the first data structure and the second data structure respectively to compare the first metadata and the second metadata, and by receiving the part of tree data corresponding to the second tree, the second tree data of the second tree is transmitted incrementally, so an amount of network traffic and memory consumption can be reduced, and the receiving of the second tree data and the identification of the difference can be performed in parallel, so as to reduce time to identify the difference between the first metadata and the second metadata, thereby improving the efficiency of identification.
Need to check novelty before this filing date? Find Prior Art

Description

DATA PROCESSING METHOD AND RELATED APPARATUSESTECHNICAL FIELD

[0001] The present disclosure relates to the field of data synchronization technologies, and in particular, to a data processing method and related apparatuses.BACKGROUND

[0002] Many distributed systems require common state shared across individual nodes to be synchronized, that is, kept consistent over time as the state changes at any individual node. Most synchronization algorithms use a combination of incremental updates, where changes are sent to keep all parties (nodes) in synchronization, and full updates, where the entire state is sent to keep all parties in synchronization.

[0003] This background information is provided to reveal information believed by the applicant to be of possible relevance to the present disclosure. No admission is necessarily intended, nor should be construed, that any one of the preceding information constitutes prior art against the present disclosure.SUMMARY

[0004] In a first aspect, a data processing method applied to a first end is provided by the embodiment of the present disclosure, and the method includes:

[0005] obtaining first tree data, where the first tree data is determined while a first tree is built up according to first metadata of the first end, where the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure;

[0006] receiving second tree data from a second end, where the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second tree data includes a part of tree data corresponding to the second tree, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure; and

[0007] identifying a difference between the first metadata and the second metadata by comparing the second tree data with the first tree data.

[0008] In the data processing method, by using the first tree and the second tree corresponding to the first data structure and the second data structure respectively to compare the first metadata and the second metadata, and by receiving the part of tree data corresponding to the second tree, the second tree data of the second tree is transmitted incrementally, so an amount of network traffic and memory consumption can be reduced, and the receiving of the second tree data and the identification of the difference can be performed in parallel, so as to reduce time to identify the difference between the first metadata and the second metadata, thereby improving the efficiency of identification.

[0009] In a possible implementation of the first aspect, the first tree data includes first information for indicating the first metadata in the first topology, and the second tree data includes second information for indicating the second metadata in the second topology;

[0010] the identifying the difference between the first metadata and the second metadata by comparing the second tree data with the first tree data includes:

[0011] comparing the second information with the first information to obtain a comparison result; and

[0012] identifying the difference between the first metadata and the second metadata according to the comparison result.

[0013] Since the second tree data of the second tree is transmitted incrementally, instead of transmitting the entire second tree data, and the identification process can be carried out based on the part of second tree data and its corresponding part of first tree data, the identification process can be executed concurrently with the determination processes of the second tree data and the first tree data, thus reduce time to identify the difference between the first metadata and the second metadata and improve the efficiency of identification.

[0014] In a possible implementation of the first aspect, before the obtaining the first tree data, the method further includes:

[0015] ordering the first metadata in a first preset order to obtain first ordered metadata.

[0016] By ordering the first metadata in the first end to be consistent with the order of the second metadata in the second end, the order of the first tree data corresponding to the first metadata and the order of the second tree data corresponding to the second metadata are also consistent, so that the time for identifying the difference between the first metadata and the second metadata can be reduced, thereby improving the efficiency of identification.

[0017] In a possible implementation of the first aspect, the building up of the first tree according to the first metadata of the first end includes:

[0018] processing metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data; and

[0019] building up the first tree according to the first tree data.

[0020] In a possible implementation of the first aspect, the first information includes first metadata information and first content information, the processing the metadata nodes in the first data structure corresponding to the first ordered metadata to obtain the first tree data includes:

[0021] determining the first metadata information for each first metadata node in the first data structure corresponding to the first ordered metadata;

[0022] determining the first metadata information and the first content information for each second metadata node in the first data structure corresponding to the first ordered metadata;

[0023] where the first content information for each second metadata node is determined according to first metadata information for a metadata node which is a child metadata node of the second metadata node;

[0024] the first tree includes a first tree node for attaching the first metadata information, and a second tree node for attaching the first metadata information and the first content information.

[0025] In a possible implementation of the first aspect, the second information includes second metadata information and second content information, the second metadata information is determined for each third metadata node in second ordered metadata, the second metadata information and the second content information are determined for each fourth metadata node in the second ordered metadata, the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node, and the second tree includes a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information;

[0026] the comparing the second information with the first information to obtain the comparison result includes:

[0027] for each third tree node, determining whether there is a first tree node whose first metadata information is matched with second metadata information of the third tree node by traversing the first tree in a second preset order, and the second preset order is same as the first preset order;

[0028] if yes, marking the first tree node as a first state, where the first state is used for indicating that metadata corresponding to the first tree node does not need to be updated;

[0029] if not, marking the first tree node as a second state, where the second state is used for indicating that metadata corresponding to the first tree node needs to be updated.

[0030] By comparing the first tree data and the second tree data with first metadata information of each first tree node and second metadata information of each third tree node, the memory consumption is reduced, and the traversal order for comparison is consistent with the order of the first metadata and the second metadata, the time for comparison can be reduced,  thus the efficiency of identification can be improved.

[0031] In a possible implementation of the first aspect, the comparing the second information with the first information to obtain the comparison result includes further includes:

[0032] for each fourth tree node, determining whether there is a second tree node whose first metadata information and first content information are matched with second metadata information and second content information of the fourth tree node respectively by traversing the first tree in the second preset order;

[0033] if the first metadata information and first content information are matched with the second metadata information and second content information respectively, marking the second tree node as a third state, where the third state is used for indicating that metadata corresponding to the second tree node does not need to be updated; or

[0034] if the first content information is matched with the second content information, and the first metadata information is not matched with the second metadata information, marking the second tree node as a fourth state, where the fourth state is used for indicating that metadata corresponding to the second tree node needs to be updated; or

[0035] if the first metadata information is matched with the second metadata information, and the first content information is not matched with the second content information, comparing whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node, and marking the second tree node as a fifth state, where the fifth state is used for indicating that the next level tree node under the second tree node needs to be compared; or

[0036] if the first metadata information is not matched with the second metadata information, and the first content information is not matched with the second content information, checking other fourth tree nodes in the second tree.

[0037] By comparing the first metadata information and the first content information of each second tree node with the second metadata information and second content information of each fourth tree node, the memory consumption is reduced, and the traversal order for comparison is consistent with the order of the first metadata and the second metadata, the time for comparison can be reduced; in addition, for difference comparison results of the second tree node and the fourth tree node, difference operations are performed in the second tree node and / or the fourth tree node, thereby improving an accuracy of the comparison.

[0038] In a possible implementation of the first aspect, checking the other fourth tree nodes in the second tree includes:

[0039] determining whether there is a further fourth tree node whose second content information is matched with the first content information of the second tree node by traversing the second tree,

[0040] if yes, marking the second tree node as the fourth state;

[0041] if not, marking the second tree node as a sixth state, where the sixth state is used for indicating that the fourth tree node does not match with the second tree node.

[0042] By checking whether there is a further fourth tree node whose second content information is matched with the first content information of the second tree node, in a case where a second metadata node corresponding to the second tree node is renamed, it can avoid directly requesting metadata related to a child metadata node of the second metadata node, thus reducing an amount of network traffic.

[0043] In a possible implementation of the first aspect, when the first tree node is marked as the second state, the method further includes adding the third tree node to a first set, and when the second tree node is marked as the sixth state, the method further includes adding the fourth tree node to the first set.

[0044] In a possible implementation of the first aspect, the method further includes: for each third tree node in the first set, determining whether there is a further first tree node whose first metadata information is matched with second metadata information of the third tree node;

[0045] if yes, determining metadata corresponding to the further first tree node as metadata corresponding to the third tree node;

[0046] if not, requesting metadata corresponding to the third tree node from the second end.

[0047] In this way, the amount of information that needs to be requested and transferred can be reduced by checking if that metadata related to the third tree node the already exists locally.

[0048] In a possible implementation of the first aspect, the method further includes:

[0049] for each fourth tree node in the first set, determining whether there is a further second tree node whose first content information is matched with second content information of the fourth tree node

[0050] if yes, determining metadata corresponding to the further second tree node as metadata corresponding to the fourth tree node;

[0051] if not, determining whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node.

[0052] In this way, the amount of information that needs to be requested and transferred can be reduced by checking if that metadata related to the third tree node the already exists locally.

[0053] In a possible implementation of the first aspect, the method further includes: the first metadata information is a hash of metadata corresponding to the first metadata node, and / or a hash of metadata corresponding to the second metadata node; the first content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the second metadata node; and the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.

[0054] In a possible implementation of the first aspect, the method further includes: traversing a first tree in which a node is marked, to obtain a change list.

[0055] In a possible implementation of the first aspect, the traversing the first tree in which the node is marked, to obtain the change list includes:

[0056] for each first tree node, determining whether the first tree node is marked;

[0057] if yes, determining whether the first tree node is marked as the first state or the second state, if the first tree node is marked as the first state, skipping the first tree node; if the first tree node is marked as the second state, adding the first tree node to the change list as a first entry;

[0058] if not, adding the first tree node to the change list as a second entry.

[0059] In a possible implementation of the first aspect, the traversing the first tree in which the node is marked, to obtain the change list includes:

[0060] for each second tree node, determining whether the second tree node is marked;

[0061] if yes, and the second tree node is marked as the third state, skipping the second tree node; or, if yes, and the second tree node is marked as the fourth state or the sixth state, adding the second tree node to the change list as a third entry; or, if yes, and the second tree node is marked as the fifth state, traversing a child node of the second tree node to determine which child node is not matched;

[0062] if not, adding the second tree node to the change list as a second entry.

[0063] In this way, the method allows for efficient processing of moves and renames, without having to re-request all of the metadata for any node that are already present in the first end from the second node.

[0064] In a possible implementation of the first aspect, the second tree node includes a group node, the first tree node includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0065] In a possible implementation of the first aspect, the first tree further includes a bundle node representing a node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0066] By building the first tree in this way, performance and efficiency of data processing can be improved in the case where there are second metadata nodes with large numbers of first metadata nodes or sub-second metadata nodes.

[0067] In a possible implementation of the first aspect, the receiving the second tree data from the second end includes:

[0068] receiving a packet including the second tree data from the second end.

[0069] Since the second tree data of the second tree is transmitted in a packet, instead of transmitting the entire second tree data, and the identification process can be carried out based on the second tree data included in the packet and its corresponding  first tree data, the identification process can be executed concurrently with the determination processes of the second tree data and the first tree data, thus reduce time to identify the difference between the first metadata and the second metadata and improve the efficiency of identification.

[0070] In a possible implementation of the first aspect, both the first data structure and the second data structure are N-ary tree structures, and N is a positive integer greater than or equal to 1.

[0071] The data processing method is suitable for N-ary tree structures according to actual needs, such as a metadata tree of hierarchical file system.

[0072] In a possible implementation of the first aspect, the method further includes: synchronizing the first metadata with the second metadata according to the difference between the first metadata and the second metadata.

[0073] In a possible implementation of the first aspect, before the obtaining the first tree data, the method further includes:

[0074] determining a second set to be sent to the second end, where the second set includes all changes to the first metadata.

[0075] In this way, since parts of the tree that are identified to have changed is transmitted simply, the corresponding metadata that has changed in the first end is transmitted simply, so that the time to synchronize the first metadata and the second metadata is reduced, and the memory consumption is reduced, and the data synchronization efficiency is improved.

[0076] In a possible implementation of the first aspect, the first topology of the first tree corresponds to the second topology of the second tree.

[0077] The first topology of the first tree corresponds to the second topology of the second tree, that is, the first tree data of the first tree and the second tree data of the second tree are ordered in the consistent order, so the time for comparison of the first metadata and the second metadata can be reduced, thus the efficiency of identification can be improved.

[0078] In a possible implementation of the first aspect, the obtaining the first tree data includes:

[0079] obtaining, by a data processing component in the first end, the first tree data.

[0080] In a possible implementation of the first aspect, the data processing component includes a processor or an accelerator.

[0081] The data processing component in the first end determines the first tree data, so that impacts on CPU resources of the first end being a storage system can be reduced.

[0082] In a possible implementation of the first aspect, the first end is a destination end and the second end is a source end.

[0083] In a possible implementation of the first aspect, the method further includes: transmitting a data processing request to the second end.

[0084] In a second aspect, a data processing method applied to a second end is provided by the embodiment of the present disclosure, and the method includes:

[0085] obtaining second tree data, where the second tree data is determined while a second tree is built up according to second metadata of the second end, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure, where the second tree data includes a part of tree data corresponding to the second tree;

[0086] transmitting the second tree data to a first end.

[0087] In the data processing method, by determining second tree corresponding to the second data structure to compare the first metadata and the second metadata, and by receiving the part of tree data corresponding to the second tree, the second tree data of the second tree is transmitted incrementally, so an amount of network traffic and memory consumption can be reduced.

[0088] In a possible implementation of the second aspect, the second tree data includes second information for indicating the second metadata in the second topology.

[0089] In a possible implementation of the second aspect, before the obtaining the second tree data, the method further includes:

[0090] ordering the second metadata in a first preset order to obtain second ordered metadata.

[0091] By ordering the second metadata in the second end to be consistent with the order of the first metadata in the first end, the order of the first tree data corresponding to the first metadata and the order of the second tree data corresponding to  the second metadata are also consistent, so that the time for identifying the difference between the first metadata and the second metadata can be reduced, thereby improving the efficiency of identification.

[0092] In a possible implementation of the second aspect, the building up of the second tree according to the second metadata of the second end includes:

[0093] processing metadata nodes in a second data structure corresponding to the second ordered metadata to obtain the second tree data; and

[0094] building up the second tree according to the second tree data.

[0095] In a possible implementation of the second aspect, the second information includes second metadata information and second content information, the processing the metadata nodes in the second data structure corresponding to the second ordered metadata to obtain the second tree data includes:

[0096] determining the second metadata information for each third metadata node in the second data structure corresponding to the second ordered metadata;

[0097] determining the second metadata information and the second content information for each fourth metadata node in the second data structure corresponding to the second ordered metadata;

[0098] where the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node;

[0099] the second tree includes a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information.

[0100] In a possible implementation of the second aspect, the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.

[0101] In a possible implementation of the second aspect, the fourth tree node includes a group node, the third tree node includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0102] In a possible implementation of the second aspect, the second tree further includes a bundle node representing a node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0103] By building the second tree in this way, performance and efficiency of data processing can be improved in the case where there are fourth metadata nodes with large numbers of third metadata nodes or sub-third metadata nodes.

[0104] In a possible implementation of the second aspect, the transmitting the second tree data to the first end includes:

[0105] transmitting a packet including the second tree data to the first end.

[0106] Since the second tree data of the second tree is transmitted in a packet, instead of transmitting the entire second tree data, and the identification process can be carried out based on the second tree data included in the packet and its corresponding first tree data, the identification process can be executed concurrently with the determination processes of the second tree data and the first tree data, thus reduce time to identify the difference between the first metadata and the second metadata and improve the efficiency of identification.

[0107] In a possible implementation of the second aspect, the second data structure is an N-ary tree structure, and N is a positive integer greater than or equal to 1.

[0108] The data processing method is suitable for N-ary tree structures according to actual needs, such as a metadata tree of hierarchical file system.

[0109] In a possible implementation of the second aspect, before the obtaining the second tree data, the method further includes:

[0110] determining a second set to be sent to the first end, where the second set includes all changes to the second metadata.

[0111] In this way, since parts of the tree that are identified to have changed is transmitted simply, the corresponding metadata that has changed in the second end is transmitted simply, so that the time to synchronize the first metadata and the  second metadata is reduced, and the memory consumption is reduced, and the data synchronization efficiency is improved.

[0112] In a possible implementation of the second aspect, the obtaining the second tree data includes:

[0113] obtaining, by a data processing component in the second end, the second tree data.

[0114] In a possible implementation of the second aspect, the data processing component includes a processor or an accelerator.

[0115] The data processing component in the second end determines the first tree data, so that impacts on CPU resources of the first end being a storage system can be reduced.

[0116] In a possible implementation of the second aspect, the second end is a source end and the first end is a destination end.

[0117] In a possible implementation of the second aspect, the method further includes receiving a data processing request from the first end.

[0118] In a third aspect, a data processing apparatus is provided by the embodiment of the present disclosure, and the apparatus includes various modules configured to execute the data processing method according to the first aspect or any possible implementation of the first aspect.

[0119] In a fourth aspect, a data processing apparatus is provided by the embodiment of the present disclosure, and the apparatus includes various modules configured to execute the data processing method according to the second aspect or any possible implementation of the second aspect.

[0120] In a fifth aspect, a first end is provided by the embodiment of the present disclosure, and the first end includes at least one processor, where the at least one processor is configured to execute the data processing method according to the first aspect or any possible implementation of the first aspect.

[0121] In a sixth aspect, a second end is provided by the embodiment of the present disclosure, and the first end includes at least one processor, where the at least one processor is configured to execute the data processing method according to the second aspect or any possible implementation of the second aspect.

[0122] In a seventh aspect, a data processing system is provided by the embodiment of the present disclosure, the data processing system includes a first end according to the fifth aspect and a second end according to the sixth aspect.

[0123] In an eighth aspect, a computing device cluster is provided by the embodiment of the present disclosure, the computing device cluster includes a processing circuitry for performing the data processing method according to the first aspect or any possible implementation of the first aspect, or the data processing method according to the second aspect or any possible implementation of the second aspect.

[0124] In a ninth aspect, a computer program product is provided by the embodiment of the present disclosure, and the computer program product includes computer execution instructions which, when executed by a processor, cause the processor to execute the data processing method according to the first aspect or any possible implementation of the first aspect or according to the second aspect or any possible implementation of the second aspect.

[0125] In a tenth aspect, a computer program is provided by the embodiment of the present disclosure, and the computer program includes computer execution instructions which, when executed by a processor, cause the processor to execute the data processing method according to the first aspect or any possible implementation of the first aspect or according to the second aspect or any possible implementation of the second aspect.

[0126] In an eleventh aspect, a computer-readable medium is provided by the embodiment of the present disclosure, and the computer-readable medium includes computer execution instructions which, when executed by a processor, cause the processor to execute the data processing method according to the first aspect or any possible implementation of the first aspect or according to the second aspect or any possible implementation of the second aspect.

[0127] In a twelfth aspect, a chip is provided by the embodiment of the present disclosure, and the chip includes an input / output (I / O) interface and a processor, where the processor is configured to call and run computer execution instructions stored in a memory, to enable a device installing with the chip to execute the data processing method according to the first aspect or any possible implementation of the first aspect or according to the second aspect or any possible implementation of  the second aspect.

[0128] A data processing method and related apparatus are provided by the embodiment of the present disclosure. First tree data is obtained, where the first tree data is determined while a first tree is built up according to first metadata of the first end, where the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure; second tree data is received from a second end, where the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second tree data comprises a part of tree data corresponding to the second tree, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure; and a difference is identified between the first metadata and the second metadata by comparing the second tree data with the first tree data. By using the first tree and the second tree corresponding to the first data structure and the second data structure respectively to compare the first metadata and the second metadata, and by receiving the part of tree data corresponding to the second tree, the second tree data of the second tree is transmitted incrementally, so an amount of network traffic and memory consumption can be reduced, and the receiving of the second tree data and the identification of the difference can be performed in parallel, so as to reduce time to identify the difference between the first metadata and the second metadata, thereby improving the efficiency of identification.BRIEF DESCRIPTION OF THE DRAWINGS

[0129] FIG. 1A is a schematic diagram of a data processing system for which a data processing method according to one or more embodiments of the present disclosure is applied.

[0130] FIG. 1B is a schematic diagram of an exemplary data processing system according to one or more embodiments of the present disclosure.

[0131] FIG. 1C is a schematic diagram of an exemplary data processing system according to one or more embodiments of the present disclosure.

[0132] FIG. 2 is a schematic diagram of a data processing method according to one or more embodiments of the present disclosure.

[0133] FIG. 3 is a schematic flowchart of an exemplary process of determining first tree data in a data processing method according to one or more embodiments of the present disclosure.

[0134] FIG. 4 is a schematic diagram of an exemplary first data structure according to one or more embodiments of the present disclosure.

[0135] FIG. 5A is a schematic diagram of an exemplary process of building a first tree according to one or more embodiments of the present disclosure.

[0136] FIG. 5B is a schematic diagram of another exemplary process of building a first tree according to one or more embodiments of the present disclosure.

[0137] FIG. 5C is a schematic diagram of yet another exemplary process of building a first tree according to one or more embodiments of the present disclosure.

[0138] FIG. 6 is a schematic diagram of an exemplary part of tree data corresponding to a second tree according to one or more embodiments of the present disclosure.

[0139] FIG. 7 is a schematic flowchart of an exemplary process of identifying a difference in a data processing method according to one or more embodiments of the present disclosure.

[0140] FIG. 8A to FIG. 8D are schematic diagrams of an exemplary process of identifying a difference in a data processing method according to one or more embodiments of the present disclosure.

[0141] FIG. 9 is a schematic diagram of an exemplary Merkel tree according to one or more embodiments of the present disclosure.

[0142] FIG. 10 is a schematic structural diagram of a data processing apparatus according to one or more embodiments of the present disclosure.

[0143] FIG. 11 is a schematic structural diagram of another data processing apparatus according to one or more embodiments of the present disclosure.

[0144] FIG. 12 is a structural diagram of an electronic device according to one or more embodiments of the present disclosure.DETAILED DESCRIPTION

[0145] The embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0146] Before describing the detail contents of the present disclosure, the following terms are explained.

[0147] Bytestream –A stream of bytes.

[0148] Directory –A set of zero or more child directories and / or files. A directory also has metadata associated with itself.

[0149] File–A single file, with no children.

[0150] Group –which attaches information related to metadata of a directory and its child directories and / or files.

[0151] Item –which attaches information related to metadata of a file.

[0152] Merkle tree –A data structure where ordered data (which is also referred to as ordered metadata below) is segmented and hashed such that a tree of hashes can be constructed where each parent node of the tree is labelled with the hash of the hashes of all child nodes.

[0153] Metadata –Information about other information. The metadata includes information about the file or directory, such as a size, a name, a parent, access control permissions, updates times, etc.

[0154] Proxy Merkle tree –A Merkle tree that has a topology that directly corresponds to an original tree (which is also referred to as file system metadata tree below) . For example, an original tree with three children would have a corresponding Merkle tree that also has three children. This allows the proxy Merkle tree to act as a proxy for the original tree. A Merkle tree and a proxy Merkle tree are used interchangeably herein.

[0155] Synchronization –The process of two ends (can also be referred to as nodes or systems) becoming the same.

[0156] Many distributed systems require common state shared across individual nodes (ends) to be synchronized, that is, kept consistent over time as the state changes at any individual node (end) . Most synchronization algorithms use a combination of incremental updates, where changes are sent to keep all parties in synchronization, and full updates, where an entire state is sent to keep all parties in synchronization. Full updates are typically required when nodes are first joining the system, when incremental updates are not available, or when problems are encountered applying incremental updates.

[0157] Full synchronization of metadata (which is a specific example of the state of the end above) between systems (ends) with divergent states requires either a) completely transferring the entire set of metadata for first synchronization between to-be-synchronized-ends, this process includes the transmission of the full update; or b) for re-synchronization between ends that have been synchronized before, first identifying differences between the two end states, then transferring only those differences, this process includes the transmission of the incremental updates.

[0158] Efficiently identifying changes and efficiently transferring changes can have a dramatic impact on the operational cost and performance of the synchronization operation.

[0159] In the related art, an example of a modern synchronization framework that can be used for metadata synchronization is the Fluid Framework, which provides a general-purpose framework for synchronizing changes across multiple systems. Fluid uses a client-server architecture where a) each client queues and sends local state changes to a server, b) the server persistently stores changes, c) the server orders and distributes the changes to all other clients, and d) each client merges received changes into the local state. To improve efficiency, the server creates and stores “summaries” , which are merged changes that represent the complete state at a given time. This allows clients to start from the latest summary, rather than having to apply all changes, and allows the server to bound the number of changes that must be stored. This approach represents a baseline where the entire state plus any subsequent changes must be sent. However, this approach of sending the full state (the “summary” ) does not take advantage of any commonalities that may already exist in the destination state.

[0160] An example of a file synchronization algorithm that can be applied to metadata synchronization is the “rsync”  algorithm. This algorithm requires metadata on each node to be serialized into a bytestream and on a destination node, to be divided into blocks of equal size. The destination node then computes two checksums for each block, a fingerprint and a rolling checksum, which are sent to a source node. The source node then searches through the local serialized bytestream to identify matching blocks. Data that is different is then sent from the source node to the destination node, along with instructions on how to reassemble these differences together with data that has not changed. This approach represents an improvement on Fluid, as only the fingerprints and identified changes need to be sent, typically resulting in significant reductions in the amount of network traffic required. The approach is not aware of the structure of the metadata and requires dividing up the serialized bytestream into fixed-sized blocks, so it is not able to take advantage of the structure of the metadata being synchronized. Furthermore, all fingerprints are sent regardless of the degree of changes in the state.

[0161] The present disclosure proposes a data processing method for synchronizing metadata, so as to improve operational cost and performance of the synchronization operation.

[0162] The solution of the present disclosure is applicable in any device that uses a Global File System feature of storage products such as storage systems index servers, or any other distributed system where bulk resynchronization of metadata is required.

[0163] FIG. 1A is a schematic diagram of a data processing system for which a data processing method according to one or more embodiments of the present disclosure is applied. As shown in FIG. 1A, the data processing system 100 may include at least one first end 101 and at least one second end 102, the at least one first end 101 is connected to the at least one second end 102 in a communicative way (e.g., via a wired or wireless network) . In a possible implementation, the first end 101 and the second end 102 both are configured to perform operations of data synchronization between the first end 101 and the second end 102, that is, the data synchronization can be performed in both directions at once. In a possible implementation, one of the first end 101 and the second end 102 is configured to perform operations of data synchronization, that is, the data synchronization can be performed in one direction.

[0164] In a possible implementation, each of the first end and the second end can be a storage system, an index server storing sorted index tree (the index is a special form of metadata) , or can be any network element provides metadata organized into a tree, which is not limited in the embodiments of the present disclosure. In a possible implementation, the first end can be a destination node that is to be synchronized to be consistent with the source node, and the second end can be the source node, or the first end can be a source node, and the second end can be a destination node, which is not limited in the embodiments of the present disclosure.

[0165] Take the illustrative scenario where the first end is the destination node and the second end is the source node, and only the first end needs to be synchronized as an example, the operation process of the data processing system includes: obtaining by the first end first tree data, where the first tree data is determined while a first tree is built up according to first metadata of the first end, where the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure; obtaining by the second end second tree data, where the second tree data is determined while a second tree is built up according to second metadata of the second end, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure, where the second tree data includes a part of tree data corresponding to the second tree; transmitting, by the second end, the second tree data to a first end; receiving, by the first end, second tree data from the second end; and identifying, by the first end, a difference between the first metadata and the second metadata by comparing the second tree data with the first tree data, which will be described in detail below.

[0166] FIG. 1B is a schematic diagram of an exemplary data processing system according to one or more embodiments of the present disclosure. In the data processing system including a storage system A and a storage system B, where the first end is the storage system B, and the second end is the storage system A, the storage system A and storage system B both include a scanner and a data processing component (i.e., processor as shown in FIG. 1B) , operations related to the scanner and the processor will be described in detail below.

[0167] FIG. 1C is a schematic diagram of another exemplary data processing system according to one or more embodiments of the present disclosure. In the data processing system including a storage system A, a data processing unit (DPU) A, a storage  system B and a data processing unit B, where the first end includes a storage system B and the data processing unit B, and the second end includes a storage system A and the data processing unit A, each of the storage system A and storage system B includes a scanner, a data processing component corresponding to the storage system A is included in the data processing unit A, and a data processing component corresponding to the storage system B is included in the data processing unit B, and each data processing component is connected to its corresponding scanner in a communicative way. The data processing component also can be an accelerator instead of the processor shown in FIG. 1C, the data processing process can be offloaded to a DPU, which can reduce impacts on storage system CPU resources. The operations related to the scanner and the data processing component will be described in detail below.

[0168] The present disclosure proposes an approach for efficient synchronization of metadata across two or more ends. It uses (proxy) Merkle trees of metadata trees to allow full synchronization to be performed incrementally by efficiently identifying changes and encoding the changes into a specific format. The metadata structure (e.g., metadata tree mentioned below) is traversed on each end to be synchronized. A Merkle tree is built up based on an organization of metadata stored in the metadata structure, the Merkle tree contains, for example, a hash for each directory’s metadata and a hash for each directory’s contents, and hash for each file’s metadata. As a Merkle tree is built on a source end, a network packet (which is also referred to as packet herein) containing immediate children of the Merkle tree, starting from the root of the Merkle tree, is sent to a destination end. The destination end compares the hashes of the received branches (which are included in the packet) with the Merkle tree they are building locally. Depending on an outcome of the hash comparison, the destination end can identify which additional parts of the received Merkle tree are needed and request them. At the end of the data processing process, the destination end knows which directory and / or file was added, which directory and / or file was moved, which directory and / or file was changed, and can identify which directory and / or file was updated and deleted using a conflict resolution process. The data processing method can be performed in parallel, performed in both directions at once, that is, data synchronization can be performed on metadata in both the source end and the destination end; and the data processing method performed between multiple pairs of ends at once. If changes are incrementally applied to the Merkle tree, this data synchronization process can be repeated until convergence is reached. For example, if a file system metadata is dynamically changing while the synchronization process is underway, changes can be incrementally applied to the Merkle tree (by updating hashes, or changing structure of the tree if a directory / file is added, copied, moved or removed) . The synchronization process can be resumed from the root of the Merkle tree, and will still converge. In some case, the use of the hierarchical structure of the metadata can efficiently determine when no changes need to be transferred.

[0169] The technical solution of the present disclosure will be described in detail below through specific embodiments. In the following, the data processing method according to the embodiments of the present disclosure will be illustrated with reference to FIG. 2. The data processing method is implemented by the data processing system including a first end and a second end as shown in FIG. 1A to FIG. 1C. The method includes the following steps.

[0170] S201, the first end obtains first tree data.

[0171] Specifically, the first tree data is determined while a first tree is built up according to first metadata of the first end, and the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure.

[0172] In a possible implementation, the first end can be a destination node as mentioned above, for example, a destination storage system. The first metadata can be information about data on the first end, such as a size, a name, a parent, access control permissions, updates times of the data on the first end, etc., which is not limited in the embodiments of the present disclosure, and the first data structure can be a data structure for storing the first metadata.

[0173] In a possible implementation, the first data structure can be a sub-tree data structure for storing corresponding first metadata. For example, the first metadata is file system metadata in the first end, the first metadata can be entire file system metadata or a part of file system metadata in the first end, and accordingly the first data structure can be an entire metadata tree or a metadata sub-tree which is a part of the entire metadata tree. In a possible implementation, in the case where the first metadata is a part of metadata in the first end, and the first data structure is a metadata sub-tree, there are several metadata sub-trees in the first end, which constitutes the entire metadata tree of the metadata, the data processing can be performed on first  metadata corresponding to each of the metadata sub-trees sequentially or in parallel.

[0174] In a possible implementation, the first tree data includes first information for indicating the first metadata in the first topology, and the first tree data can be determined based on the first metadata, in a possible implementation, before the determination of the first tree data by the first end, the first end needs to obtain first ordered metadata by ordering the first metadata in a first preset order, and then determines the first tree data based on the first ordered metadata. The first preset order can be hard-coded by a software developer, for example, the first metadata is information about phone contacts, includes a name, a telephone number, a home address, etc., the name includes “Barry” , “Andrew” , “Zane” , “Jessica” , “Andy” , and, first preset order can be from A to Z according to the letter of the name, and accordingly the first ordered metadata can be “Andy” , “Andrew” , “Barry” , “Jessica” and “Zane” . It should be noted that this example is just for illustration, which is not limited in the embodiments of the present disclosure.

[0175] By ordering the first metadata in the first end to be consistent with the order of the second metadata in the second end, the order of the first tree data corresponding to the first metadata and the order of the second tree data corresponding to the second metadata are also consistent, so that the time for identifying the difference between the first metadata and the second metadata can be reduced, thereby improving the efficiency of identification.

[0176] In a possible implementation of the present disclosure, the step S201 of determination of the first tree data includes: processing metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data; and building up the first tree according to the first tree data. The metadata nodes are nodes in a topology of the first data structure, and each of metadata nodes has its corresponding first ordered metadata, in a possible implementation, the processing metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data can be, calculating hashes of first ordered metadata corresponding to the metadata nodes to obtain the first tree data; and the building up the first tree according to the first tree data, can be, determining the first topology of the first tree based on the topology of the first data structure, and then placing the first tree data at a corresponding node in the first topology of the first tree. In a possible implementation, the topology of the first tree can be completely consistent with that of the first data structure, or not completely consistent with that of the first data structure, i.e., the first tree 1: 1 or not 1: 1 represents the first data structure.

[0177] In a possible implementation of the present disclosure, there is no need to order the first metadata before the determination of the first tree data by the first end. The step S201 of determination of the first tree data includes: processing metadata nodes in a first data structure corresponding to the first metadata to obtain the first tree data; and building up the first tree according to the first tree data.

[0178] In a possible implementation of the present disclosure, the first information includes first metadata information and first content information, the metadata nodes in the first data structure include a first metadata node or includes a first metadata node and a second metadata node, the first end processing the metadata nodes in the first data structure corresponding to the first metadata to obtain the first tree data includes: the first end determining the first metadata information for each first metadata node in the first data structure corresponding to the first metadata; the first end determining the first metadata information and the first content information for each second metadata node in the first data structure corresponding to the first metadata; where the first content information for each second metadata node is determined according to first metadata information for a metadata node which is a child metadata node of the second metadata node; the first tree includes a first tree node for attaching the first metadata information, and a second tree node for attaching the first metadata information and the first content information. The first metadata can be ordered first metadata (which is also referred to as first ordered metadata herein) or unordered first metadata.

[0179] The first metadata node can be a node without an immediate child node (which is also referred to as metadata child node above) , and the second metadata node can be a node with an immediate child node, the immediate child node of metadata node means that the immediate child node is under this metadata node, and is immediately connected to this metadata node. The first metadata node only has it corresponding first metadata information, and the second metadata node has its corresponding first metadata information and the first content information. In a possible implementation, the first metadata information of the first metadata node is a hash of metadata corresponding to the first metadata node; the first metadata  information of the second metadata node is a hash of metadata corresponding to the second metadata node, and the first content information of the second metadata node is a hash obtained from a hash of metadata corresponding to a child metadata node of the second metadata node, that is, the first content information of the second metadata node can be a hash of hash (s) of one or more immediate child nodes of the second metadata node.

[0180] In a possible implementation of the present disclosure, step S201 of obtaining the first tree data includes a data processing component in the first end or a data processing component corresponding to the first end obtaining the first tree data.

[0181] In a possible implementation of the present disclosure, the data processing component includes a processor or an accelerator. The data processing component can be, for example, a processor shown in FIG. 1B and FIG. 1C.

[0182] S202, the second end obtains second tree data.

[0183] Specifically, the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure, where the second tree data includes a part of tree data corresponding to the second tree.

[0184] In a possible implementation, the second end can be a source node as mentioned above, for example, a source storage system. The second metadata can be information about data on the second end, such as a size, a name, a parent, access control permissions, updates times of the data on the second end, etc., which is not limited in the embodiments of the present disclosure, and the second data structure can be a data structure for storing the second metadata.

[0185] In a possible implementation, the second data structure can be a sub-tree data structure for storing corresponding second metadata. For example, the second metadata is file system metadata in the second end, the second metadata can be entire file system metadata or a part of file system metadata in the second end, and accordingly the second data structure can be an entire metadata tree or a metadata sub-tree which is a part of the entire metadata tree. In a possible implementation, in the case where the second metadata is a part of metadata in the second end, and the second data structure is a metadata sub-tree, there are several metadata sub-trees in the second end, which constitutes the entire metadata tree of the metadata, the data processing can be performed on second metadata corresponding to each of the metadata sub-trees sequentially or in parallel.

[0186] In a possible implementation, the second tree data includes second information for indicating the second metadata in the second topology, and the second tree data can be determined based on the second metadata, in a possible implementation, before the determination of the second tree data by the second end, the second end needs to obtain second ordered metadata by ordering the second metadata in a first preset order, and then determines the second tree data based on the first ordered metadata.

[0187] By ordering the second metadata in the second end to be consistent with the order of the first metadata in the first end, the order of the first tree data corresponding to the first metadata and the order of the second tree data corresponding to the second metadata are also consistent, so that the time for identifying the difference between the first metadata and the second metadata can be reduced, thereby improving the efficiency of identification.

[0188] In a possible implementation, the first topology of the first tree corresponds to the second topology of the second tree.

[0189] The first topology of the first tree corresponds to the second topology of the second tree, that is, the first tree data of the first tree and the second tree data of the second tree are ordered in the consistent order, so the time for comparison of the first metadata and the second metadata can be reduced, thus the efficiency of identification can be improved.

[0190] In a possible implementation, the step S202 of determination of the second tree data includes: processing metadata nodes in a second data structure corresponding to the second ordered metadata to obtain the second tree data; and building up the second tree according to the second tree data. The metadata nodes are nodes in a topology of the second data structure, and each of metadata nodes has its corresponding second ordered metadata, in a possible implementation, the processing metadata nodes in a second data structure corresponding to the second ordered metadata to obtain the second tree data can be, calculating hashes of second ordered metadata corresponding to the metadata nodes to obtain the second tree data; and the building up the  second tree according to the second tree data, can be, determining the second topology of the second tree based on the topology of the second data structure, and then placing the second tree data at a corresponding node in the second topology of the second tree. In a possible implementation, the topology of the second tree can be completely consistent with that of the second data structure, or not completely consistent with that of the second data structure, i.e., the second tree 1: 1 or not 1: 1 represents the second data structure.

[0191] In a possible implementation of the present disclosure, there is no need to order the second metadata before the determination of the second tree data by the second end. The determination of the second tree data includes: processing metadata nodes in a second data structure corresponding to the second metadata to obtain the second tree data; and building up the second tree according to the second tree data. The processing metadata nodes in a second data structure corresponding to the second metadata to obtain the second tree data can be, calculating hashes of second metadata corresponding to the metadata nodes to obtain the second tree data; and the building up the second tree according to the second tree data, can be, determining the second topology of the second tree based on the topology of the second data structure, and then placing the second tree data at a corresponding node in the second topology of the second tree.

[0192] In a possible implementation of the present disclosure, the second information includes second metadata information and second content information, the metadata nodes in the second data structure include a third metadata node or includes a third metadata node and a fourth metadata node, the second end processing the metadata nodes in the second data structure corresponding to the second metadata to obtain the second tree data includes: the second end determining the second metadata information for each third metadata node in the second data structure corresponding to the second metadata; the second end determining the second metadata information and the second content information for each fourth metadata node in the second data structure corresponding to the second metadata; where the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node; the second tree includes a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information. The first second can be ordered second metadata (which is also referred to as second ordered metadata herein) or unordered second metadata.

[0193] The third metadata node can be a node without an immediate child node (which is also referred to as metadata child node above) , and the fourth metadata node can be a node with an immediate child node. The third metadata node only has it corresponding second metadata information, and the fourth metadata node has its corresponding second metadata information and the second content information. In a possible implementation, the second metadata information of the third metadata node is a hash of metadata corresponding to the third metadata node, the second metadata information of the fourth metadata node is a hash of metadata corresponding to the fourth metadata node; and the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node, that is, the second content information of the fourth metadata node can be a hash of hash (s) of one or more immediate child nodes of the fourth metadata node.

[0194] In a possible implementation of the present disclosure, step S202 of obtaining the second tree data includes a data processing component in the second end or a data processing component corresponding to the second end obtaining the second tree data.

[0195] In a possible implementation of the present disclosure, the data processing component includes a processor or an accelerator. The data processing component can be, for example, a processor shown in FIG. 1B and FIG. 1C.

[0196] The data processing component in the first end / second end obtains the first tree data or second tree data, so that impacts on CPU resources of the first end / second end being a storage system can be reduced.

[0197] In a possible implementation, the first tree and the second tree can be Merkle trees corresponding to the first data structure and the second data structure respectively.

[0198] In a possible implementation, both the first data structure and the second data structure are N-ary tree structures, and N is a positive integer greater than or equal to 1, for example, 1, 2, 3…, and the solution of the present disclosure is applicable for N-ary tree structures according to actual needs, such as a metadata tree of hierarchical file system.

[0199] It should be noted that there is no restriction with respect to the execution order of the steps S201 and S202, as long  as the steps are executed logically. For example, step S201 and S202 may be executed simultaneously, or in sequence, which is not limited in the embodiments of the present disclosure.

[0200] In a possible implementation of the present disclosure, the method further includes the first end determining a second set to be sent to the second end, where the second set includes all changes to the first metadata.

[0201] In a possible implementation of the present disclosure, the method further includes second end determining a second set to be sent to the first end, wherein the second set includes all changes to the second metadata.

[0202] The determination step of the second set runs for entirety of the data processing process (data synchronization process) . In a possible implementation, the metadata state (state of first metadata and second metadata) on both first end and second end is snapshotted or otherwise frozen, and all changes to local metadata are captured in a change queue (which is also referred to as the second set above) to be sent to the other storage system (end) . In some cases, the change queue holds all metadata changes that have occurred after the resynchronization process starts. At the beginning of the whole data synchronization, the determination step is performed to determine all changes, and then the subsequent data synchronization processes are performed, and once other changes on one of the two ends are detected before the data synchronization ends, the data synchronization processes are re-performed.

[0203] In this way, since parts of the tree that are identified to have changed is transmitted simply, the corresponding metadata that has changed in the second end is transmitted simply, so that the time to synchronize the first metadata and the second metadata is reduced, and the memory consumption is reduced, and the data synchronization efficiency is improved.

[0204] After the second end determines the second tree data, the method further includes the following steps.

[0205] S203, the second end transmits the second tree data to the first end; and the first end receives second tree data from the second end.

[0206] S204, the first end identifies a difference between the first metadata and the second metadata by comparing the second tree data with the first tree data.

[0207] In the data processing method, by using the first tree and the second tree corresponding to the first data structure and the second data structure respectively to compare the first metadata and the second metadata, and by receiving the part of tree data corresponding to the second tree, the second tree data of the second tree is transmitted incrementally, so an amount of network traffic and memory consumption can be reduced, and the receiving of the second tree data and the identification of the difference can be performed in parallel, so as to reduce time to identify the difference between the first metadata and the second metadata, thereby improving the efficiency of identification.

[0208] FIG. 3 is a schematic flowchart of an exemplary process of determining first tree data in a data processing method according to one or more embodiments of the present disclosure, which is applied to the first end, and the process includes the following steps.

[0209] S301, order the first metadata in the first preset order to obtain first ordered metadata.

[0210] S302, process metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data, the metadata nodes includes a first metadata node and a second metadata node.

[0211] S303, determine the first metadata information for each first metadata node in the first data structure corresponding to the first ordered metadata.

[0212] S304, determine the first metadata information and the first content information for each second metadata node in the first data structure corresponding to the first ordered metadata.

[0213] S305, determine the first tree data based on the first metadata information and the first content information.

[0214] It should be noted that there is no restriction with respect to the execution order of the steps S303 and S304, as long as the steps are executed logically.

[0215] In a possible implementation of the present disclosure, the second tree node includes a group node, the first tree node includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0216] In a possible implementation of the present disclosure, the fourth tree node includes a group node, the third tree node  includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0217] In a possible implementation, the step S301 of ordering the first metadata is performed by a scanner in the first end in the data processing system as shown in FIG. 1B and FIG. 1C.

[0218] The scanner traverses a local metadata tree (which is a specific example of first data structure for storing first metadata above) in a consistent order (which is also referred to as first preset order above) . For an embodiment where the first metadata is a hierarchical file system metadata, the first metadata would be ordered by a method such as lexical sorting by name, though any consistent ordering will work. The ordered metadata (which is also referred to as first ordered metadata above) output from the scanner is sent to a processor in the data processing system as shown in FIG. 1B and FIG. 1C; and the processor receives the ordered file system metadata (which is a specific example of first ordered metadata above) . The local metadata tree in which the first metadata has been ordered, is processed in a traversal order. FIG. 4 is a schematic diagram of an exemplary local metadata tree, where dash line indicates the traversal order, and “R” is a root (starting and ending point of this tree) , “D” is a directory (which is a specific example of first metadata node above) , and “F” is an file (which is a specific example of second metadata node above) .

[0219] As the metadata tree is traversed, for each directory, a group “G” placeholder (which is also referred to as group node of second tree node above) of Merkle tree (which is a specific example of the first tree above) is created in memory. For each file, its corresponding file metadata is hashed and added to the Merkel tree as an item “I” (which is also referred to as item node of first tree node above) . This the Merkle tree is incrementally built up from the metadata tree. FIG. 5A shows an exemplary resulting Merkle tree on the right after processing the first three metadata nodes, where processed metadata nodes are shown on the left in bold. A single hatch “G” represents a placeholder branch in the Merkle tree, which indicates not all first information (including first metadata information and / or first content information) of this metadata node is attached to the corresponding to tree node, and double-hatched “I” or “G” represents a populated branch of a leaf or branch in the Merkle tree, respectively, which indicates all first information of this metadata node is attached to the corresponding to tree node. The root is a special case of “G” group branch.

[0220] When a directory is finished being traversed that has only child files, the directory metadata (which is a specific example of first metadata above) is hashed and hashes of all files that are children of the directory are hashed, and these two hashes (the former hash is a specific example of first metadata information above, and the latter hash is a specific example of first content information above) are attached to a corresponding group placeholder of a Merkle tree.

[0221] FIG. 5B shows an exemplary resulting Merkle tree after processing the first five metadata nodes, where single hatch “G” represents a placeholder branch in the Merkle tree, which indicates not all first information (including first metadata information and / or first content information) of this metadata node is attached to the corresponding to tree node, and double-hatch “I” or “G” represents a populated branch of a leaf or branch in the Merkle tree, respectively, which indicates all first information of this metadata node is attached to the corresponding to tree node.

[0222] When a directory is finished being traversed that has child directories, or a combination of child directories and child files, the directory metadata is hashed and hashes of all files and directories that are children of the directory are hashed, and these two hashes are attached to a corresponding group placeholder of a Merkle tree. FIG. 5C shows an exemplary resulting Merkle tree after processing the first two directories under the root of the metadata tree.

[0223] The process of obtaining second tree data is similar to that of the obtaining first tree data, which will be not repeated herein.

[0224] In a possible implementation, the second tree data includes a part of tree data corresponding to the second tree, the step S202 of transmission of the second tree data includes: the second end transmitting a packet including the second tree data to the first end, and the first end receiving the packet from the second end. And accordingly, the step S204 of identifying the difference between the first metadata and the second metadata can be performed based on the part of tree data and its corresponding part of tree data in the second tree.

[0225] Since the second tree data of the second tree is transmitted in a packet, instead of transmitting the entire second tree  data, and the identification process can be carried out based on the second tree data included in the packet and its corresponding first tree data, the identification process can be executed concurrently with the determination processes of the second tree data and the first tree data, thus reduce time to identify the difference between the first metadata and the second metadata and improve the efficiency of identification.

[0226] FIG. 6 shows a schematic diagram of an exemplary part of tree data in a second tree.

[0227] As shown in FIG. 6, the second end transmits a packet to a first end. The first end receives the packet, and compares the received Merkle tree hashes (i.e., first information) of the enclosed groups and items in the packet with corresponding locally computed Merkle tree hashes (i.e., second information) , where the enclosed groups refer to groups whose all child group and / or child item are included in the groups.

[0228] In a possible implementation, a part of tree data corresponding to the second tree (Merkel tree of second end) is filled in a packet, this packet of the Merkel tree data can includes second information of at least one metadata nodes in the second end, and is assembled and sent to the first end. As shown in FIG. 6, the data to be sent as a shaded region is labelled as a “Packet” .

[0229] In a possible implementation, a packet has a limited size, e.g. 1.5Kbytes of data. Each group or item of Merkle tree takes up some space in the packet, and a packet's worth of the Merkle tree would be an amount of groups or items that fits into a packet. The packet can be sent out when it is full or not, which depends on a specific situation of the data processing system. For example, there is a situation where it takes 10 milliseconds to compute that first “G” and all of items underneath it, but then it takes 100 milliseconds to compute a next “G” . To avoid waiting for too long, the first “G” would be sent in a packet, even if this packet is not full. In a situation where it takes less time to compute a next “G” , then the first “G” and the next “G” would be sent in one packet.

[0230] In a possible implementation of the present disclosure, the determined second tree data can be streamed to the first end, without having to completely keep it in a memory on the second end. This is less efficient over the network, but is more efficient in memory on the second end. For example, when a Merkle tree on a second end (source system) is calculated, the calculated source Merkle tree to the destination system directly as compute it (streaming) , and at a destination system, perform all comparisons and processing with the source Merkle tree available in memory, rather than having to request parts of the tree on-demand.

[0231] In a possible implementation of the present disclosure, FIG. 7 is a schematic flowchart of an exemplary process of identifying a difference in a data processing method according to one or more embodiments of the present disclosure, the step S204 of identifying the difference between the first metadata and the second metadata by the first end specifically includes the following steps, as shown in FIG. 7.

[0232] S2041, the first end compares the second information with the first information to obtain a comparison result.

[0233] S2042, the first end identifies the difference between the first metadata and the second metadata according to the comparison result.

[0234] In a possible implementation, the step S204 of identifying the difference between the first metadata and the second metadata by the first end can be performed based on a part of tree data in the second tree.

[0235] Since the second tree data of the second tree is transmitted incrementally, instead of transmitting the entire second tree data, and the identification process can be carried out based on the part of second tree data and its corresponding part of first tree data, the identification process can be executed concurrently with the determination processes of the second tree data and the first tree data, thus reduce time to identify the difference between the first metadata and the second metadata and improve the efficiency of identification.

[0236] In a possible implementation of the present disclosure, the first information includes first metadata information and first content information, and the second information includes second metadata information and second content information, the step S2041 of comparing the first information and the second information includes: for each third tree node, the first end determining whether there is a first tree node whose first metadata information is matched with second metadata information of the third tree node by traversing the first tree in a second preset order, and the second preset order is same as the first preset  order; if yes, the first end marking the first tree node as a first state, where the first state is used for indicating that metadata corresponding to the first tree node does not need to be updated; if not, the first end marking the first tree node as a second state, where the second state is used for indicating that metadata corresponding to the first tree node needs to be updated.

[0237] By comparing the first metadata information of each first tree node with the second metadata information of each third tree node, the memory consumption is reduced, and the traversal order for comparison is consistent with the order of the first metadata and the second metadata, the time for comparison can be reduced, thus the efficiency of identification can be improved.

[0238] In a possible implementation of the present disclosure, when the first tree node is marked as the second state, the method further includes adding the third tree node to a first set.

[0239] In a possible implementation, for each item (which is a specific example of third tree node above) in the received Merkle tree, if its metadata hash (which is a specific example of first metadata information above) matches with a metadata hash (which is a specific example of second metadata information above) of an item (which is a specific example of first tree node above) in the locally computed Merkle tree by traversing the locally computed Merkle tree (which is a specific example of the first tree above) in the consistent order (second preset order) , no further actions need to be performed, and mark the item on the first end (destination system) as “clean” , which is a specific example of first state above. Otherwise, add the item to a detected change queue (which is also referred to as first set above) to be processed, and mark the item on the first end as “updated” , which is a specific example of second state above, with a pointer to a new metadata, the pointer is related to the new metadata, where a hash of the new metadata is from the second end, and is matched with the metadata hash of the marked item in the first end, for example, the pointer can be an ID of the new metadata matching with the metadata hash of the marked item, in some case, the detected change queue holds all metadata changes that have occurred between the last successful synchronization and when the resynchronization process started, the pointer is the relates the group with the updated metadata that will be received (which is technically a “promise” ) , which is not limited in the embodiments of the present disclosure.

[0240] In a possible implementation of the present disclosure, for each fourth tree node, the step S2041 of comparing the second information and the first information includes: the first end determining whether there is a second tree node whose first metadata information and first content information are matched with second metadata information and second content information of the fourth tree node respectively by traversing the first tree in the second preset order; if the first metadata information and first content information are matched with the second metadata information and second content information respectively, marking the second tree node as a third state, where the third state is used for indicating that metadata corresponding to the second tree node does not need to be updated; or if the first content information is matched with the second content information, and the first metadata information is not matched with the second metadata information, marking the second tree node as a fourth state, where the fourth state is used for indicating that metadata corresponding to the second tree node needs to be updated; or if the first metadata information is matched with the second metadata information, and the first content information is not matched with the second content information, comparing whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node, and marking the second tree node as a fifth state, where the fifth state is used for indicating that the next level tree node under the second tree node needs to be compared; or if the first metadata information is not matched with the second metadata information, and the first content information is not matched with the second content information, checking other fourth tree nodes in the second tree.

[0241] By comparing the first metadata information and the first content information of each second tree node with the second metadata information and second content information of each fourth tree node, the memory consumption is reduced, and the traversal order for comparison is consistent with the order of the first metadata and the second metadata, the time for comparison can be reduced; in addition, for difference comparison results of the second tree node and the fourth tree node, difference operations are performed in the second tree node and / or the fourth tree node, thereby improving an accuracy of the comparison.

[0242] In a possible implementation of the present disclosure, checking the other fourth tree nodes in the second tree includes: determining whether there is a further fourth tree node whose second content information is matched with the first  content information of the second tree node by traversing the second tree, if yes, marking the second tree node as the fourth state; if not, marking the second tree node as a sixth state, wherein the sixth state is used for indicating that the fourth tree node does not match with the second tree node.

[0243] By checking whether there is a further fourth tree node whose second content information is matched with the first content information of the second tree node, in a case where a second metadata node corresponding to the second tree node is renamed, it can avoid directly requesting metadata related to a child metadata node of the second metadata node, thus reducing an amount of network traffic.

[0244] In a possible implementation of the present disclosure, wherein when the second tree node is marked as the sixth state, the method further includes adding the fourth tree node to the first set.

[0245] The followings will describe matching process between the second tree node and the fourth tree node with reference to FIG. 8A to FIG. 8D.

[0246] In a possible implementation, for each group (which is a specific example of fourth tree node above) in the received Merkle tree, there are four possibilities:

[0247] A. If a metadata hash and a content hash (which are specific examples of second metadata information and second content information above) of this group match with a metadata hash and a content hash (which are specific examples of first metadata information and first content information above) of a group (which is a specific example of second tree node above) in the locally computed Merkle tree (which is a specific example of first tree above) by traversing the locally computed Merkle tree in the consistent order (second preset order) , that indicates that there are no changes to synchronize, and no children under that branch (i.e., the group) need to be processed. Mark the group on the first end as “clean” , which is a specific example of third state above. FIG. 8A exemplarily shows the above matching process of groups. The symbol “= / =” in FIG. 8B indicates that the metadata hash and the content hash of the group from the second tree match with those of a group from the first tree respectively.

[0248] B. If the metadata hash of this group matches with that of a group in the first tree, and the content hash does not match with that of the group in the first tree, a next level under this group of the second tree is requested from the second end as needed, and continue to perform comparison of items and / or groups (which are specific examples of next level tree node above) in the next level of the first and second tree. In this case, the matching process with reference to FIG. 8A to FIG. 8D is repeated. Mark this group on the first end as “children” , which is a specific example of fifth state above. Multiple sub-trees can be traversed in parallel, the sub-trees means that a tree composed of a node that has a child node and its child node Each sub-tree needs to be processed in order to process the entire tree. Traversing the sub-trees in parallel can reduce the latency. FIG. 8B exemplarily shows the above matching process of groups. The symbol “= / ≠” in FIG. 8B indicates that the metadata hash of this group from the second tree matches with that of a group from the first tree, and the content hash of this group from the second tree does not match with that of the group from the first tree.

[0249] C. If the metadata hash of this group does not match with that of a group in the first tree, but the content hash matches with that of the group in the first tree, mark the group on the first end as “updated” , which is a specific example of fourth state above, with a pointer to a updated metadata, where a hash of the updated metadata is from the second end, and is matched with the metadata hash of the marked group in the first end, for example, the pointer can be an ID of the updated metadata matching with the metadata hash of the marked group, which is not limited in the embodiments of the present disclosure. In a possible implementation, the first end requests the updated metadata (the request is Group / Metadata Requests as shown in FIG. 1B and FIG. 1C) from the second end, either immediately or as a batched operation together with other metadata requests, which is not limited in the embodiments of the present disclosure. FIG. 8C exemplarily shows the above matching process of groups. The symbol “≠ / =” in FIG. 8C indicates that the metadata hash of this group from the second tree does not match with that of a group from the first tree, and the content hash of this group from the second tree matches with that of the group from the first tree.

[0250] D. If the metadata hash of this group does not match with that of a group in the first tree, and the content hash does not match that of the group in the first tree, check content hashes of all other groups in the second tree sequentially, and  determine if there is a group (which is a specific example of the further fourth node above) in the other groups (which are specific example of other fourth nodes above) whose content hash is matched with that of the group in the first tree. The first end requests additional parts of the Merkle tree (second tree) from the second end (source system) as necessary, the additional parts refer to groups in the above other groups that have not been transmitted to the first end, or received by the first end. The first end knows when it has received information for all groups under a group (or under the root) , and thus it can determine if additional parts of the Merkle tree need to be requested or received from the second end.

[0251] If it is determined that there is a group in the other groups whose content hash is matched with that of the group in the first tree, the above operation C is performed on the group in the first tree.

[0252] If it is determined that there is not a group in the other groups whose content hash is matched with that of the group in the first tree, then this group (i.e., each group in the received Merkle tree above) is added to the detected change queue (which is also to referred to as the first set above) to be processed. Mark the group on the first end (destination system) as “dirty” , which is a specific example of the sixth state above, with a pointer to a new group from the second end. The pointer is related to the new group, where the new group is from the second end, and its metadata hash and content hash are matched with the metadata hash and content hash of the marked group in the first end, for example, the pointer can be an ID of the new group, which is not limited in the embodiments of the present disclosure. FIG. 8D exemplarily shows the above matching process of groups. The symbol “≠ / ≠” in FIG. 8D indicates that the metadata hash of this group from the second tree does not match with that of a group from the first tree, and the content hash of this group from the second tree does not match with that of the group from the first tree. By checking content hashes of all other groups at the same level as this group in the second tree sequentially, and determining if there is a group in the other groups whose content hash is matched with that of the group in the first tree, the changes (additions, removals and renames) that cause a change of the order of the metadata nodes in the in the metadata data structure can be detected, which can reduce the number of items marked as “dirty” .

[0253] After the first end has received the entire second tree from the second end, and has completed building its first tree, the first end will process the first set.

[0254] In a possible implementation of the present disclosure, the method further includes: for each third tree node in the first set, determining whether there is a further first tree node whose first metadata information is matched with second metadata information of the third tree node; if yes, determining metadata corresponding to the further first tree node as metadata corresponding to the third tree node; if not, requesting metadata corresponding to the third tree node from the second end.

[0255] In a possible implementation, for each item (which is a specific example of the third tree node above) in the detected change queue, the first end checks if an item that has a matching metadata hash already exists in its local Merkle tree. If a matching hash already exists in the local Merkle tree, use that metadata. If not, request the metadata from the source system. That is to say, the first end checks if there is an item whose metadata hash matched with that of the item in the detected change queue in the first end, then metadata of the item can be used directly without having to request it from the second node. The checking operation can be efficiently performed by storing the Merkle tree branches and leaves in a hash table, for example, by looking the matching metadata hash up in the hash table.

[0256] In a possible implementation of the present disclosure, the method further includes: for each fourth tree node in the first set, determining whether there is a further second tree node whose first content information is matched with second content information of the fourth tree node; if yes, determining metadata corresponding to the further second tree node as metadata corresponding to the fourth tree node; if not, determining whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node.

[0257] In a possible implementation, for each group (which is a specific example of the fourth tree node above) in the detected change queue, the first end checks if a group that has a matching metadata content hash already exists in its local Merkle tree. If a matching metadata hash already exists in the local Merkle tree, use that metadata. That is to say, the first end checks if there is a group whose metadata content hash matched with that of the group in the detected change queue in the first end, then the metadata content hash of the group can be used directly without having to request it from the second node. If not, traverse to the next level of the local Merkle tree, request parts of the Merkle tree from the second end as needed, and continue  to process the group at the next level in above operation B.

[0258] In this way, the amount of information that needs to be requested and transferred can be reduced by checking if that metadata related to the tree node the already exists locally.

[0259] In a possible implementation of the present disclosure, after each of the third tree node and the fourth tree node in the first set is fully processed, the method further includes: traversing a first tree in which a node is marked, to obtain a change list.

[0260] In a possible implementation of the present disclosure, the traversing the first tree in which the node is marked, to obtain the change list includes: for each first tree node, determining whether the first tree node is marked; if yes, determining whether the first tree node is marked as the first state or the second state, if the first tree node is marked as the first state, skipping the first tree node; if the first tree node is marked as the second state, adding the first tree node to the change list as a first entry; if not, adding the first tree node to the change list as a second entry.

[0261] In a possible implementation of the present disclosure, the traversing the first tree in which the node is marked, to obtain the change list includes: for each second tree node, determining whether the second tree node is marked; if yes, and the second tree node is marked as the third state, skipping the second tree node; or, if yes, and the second tree node is marked as the fourth state or the sixth state, adding the second tree node to the change list as a third entry; or, if yes, and the second tree node is marked as the fifth state, traversing a child node of the second tree node to determine which child node is not matched; if not, adding the second tree node to the change list as a second entry.

[0262] In a possible implementation, once the detected change queue is fully processed, do a final pass of the destination Merkle tree (first tree in which a node has been marked) to build a conflict resolution list (which is also referred to as the change list above, and is shown in FIG. 1B) using the following steps:

[0263] a. If a group is marked as “clean” , skip that group.

[0264] b. If a group is marked as “children” , traverse through the children.

[0265] c. If a group is marked as “updated” , add the group to the conflict resolution list as a “group update” entry (which is a specific example of the third entry above) .

[0266] d. If a group is marked as “dirty” , add the group to the conflict resolution list as a “group update” entry (which is a specific example of the third entry above) .

[0267] e. If a group is not marked, add the group to the conflict resolution list as a “delete, rename or new” entry (which is a specific example of the second entry above) .

[0268] f. If an item is marked as clean, skip the item.

[0269] g. If an item is marked as “updated” , add the group to the conflict resolution list as an “item update” entry (which is a specific example of the first entry above) .

[0270] h. If an item is not marked, add the item to the conflict resolution list as a “delete, rename, or new” entry (which is a specific example of the second entry above) ) .

[0271] By traversing the first tree in which a node is marked, the first end will have a complete change list, i.e., a list of all changes, and can apply conflict resolution logic to determine which type of change the change belongs to, for example, determine which changes are renames, which changes are deletions, and which changes are additions. In a possible implementation, the conflict resolution logic can be contained in a software that consumes the conflict resolution list, which is not limited in the embodiments of the present disclosure. At the end of the process, the destination node knows which metadata items were added, which metadata items were moved, which metadata items were changed, and can identify which metadata items were updated and deleted using a conflict resolution process. In this way, the method allows for efficient processing of moves and renames, without having to re-request all of the metadata for any node that are already present in the first end from the second node.

[0272] In a possible implementation of the present disclosure, the first tree further includes a bundle node representing a node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0273] In a possible implementation of the present disclosure, the second tree further includes a bundle node representing a  node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0274] In a possible implementation, the configured number can be a constant value, in a possible implementation, the configured number can be adaptive, i.e., the configured number can vary according to actual needs, for example, the configured number can be larger if it is desired to reduce the memory consumption, and the configured number can be smaller if the memory consumption is not limited, which are not limited in the embodiments of the present disclosure.

[0275] In a possible implementation, during building Merkel tree (first tree or second tree) , under a given group node, when a configured number of child nodes are present under this given group node, a “bundle” node is created in the Merkle tree, with a hash of hashes of all child nodes. When all bundles of the configured number of children are created, child nodes under the given group where there aren't enough of them to justify creating a bundle, can be called as remaining nodes, the remaining nodes can be individually placed or also can be placed in a bundle. FIG. 9 shows a schematic diagram of an exemplary Merkle tree including the above bundle node. As shown in FIG. 9, under a given group node, there are two bundle nodes, “B” represents a bundle node, and the hash for that bundle node would be for all the child nodes under that bundle node. If each bundle node has 1024 child nodes, then the given group node would have 2050 child nodes. The use of the “bundle” node makes the proxy Merkle tree no longer 1: 1 represent the file system tree, but improves performance and efficiency by better handling situations where there are large numbers of children of a group.

[0276] By building the proxy Merkel tree in this way, performance and efficiency of data processing can be improved in the case where there are directories with large numbers of files or sub-directories.

[0277] In a possible implementation of the present disclosure, after step S204 of identifying the difference between the first metadata and the second metadata, the method further includes: synchronizing the first metadata with the second metadata according to the difference between the first metadata and the second metadata. In some cases, the synchronizing the first metadata with the second metadata according to the difference between the first metadata and the second metadata includes: requesting metadata corresponding to the difference from the second end. For example, for a hierarchical file system, if a directory is moved from  / a / b to  / c / b, only the first level of the proxy Merkle tree containing the contents of  / a and  / c needs to be requested from the source system (the second end) , since the proxy Merkle tree indicates that the contents of “b” has not changed.

[0278] In a simple prototype implementation of the present disclosure, the following measured results are obtained: “abasic test program was developed to verify the approach. A file system with 16, 115 directories and 76, 438 files was created, then was allowed to diverge, with 399 file changes made and 132 directory changes made. Using the proxy Merkle tree approach of the present disclosure, only 5, 158 tree nodes had to be exchanged in 701 packets, representing slightly over 5%of the nodes that would need to be transmitted using bulk tree synchronization. This percentage can be reduced further by breaking up large directories into tree branches” .

[0279] In a possible implementation of the present disclosure, the method further includes: the first end transmitting a data processing request to the second end, and the second end receiving a data processing request from the first end.

[0280] It should be noted that although simply the case where the first end is the destination node and the second end is the source node, and only the first end needs to be synchronized is illustrated in the description in detail, the solution of the present disclosure is also applicable for the case where the first end is the destination node and the second end is the source node, and only the second end needs to be synchronized; the case where the first end is the destination node and the second end is the source node, and both the first and second ends need to be synchronized; the case where the first end is the source node and the second end is the destination node and only the first end needs to be synchronized, the case where the first end is the source node and the second end is the destination node and only the second end needs to be synchronized, and the case where the first end is the source node and the second end is the destination node and both the first and second ends need to be synchronized.

[0281] In the case where the first end is the source node, and the second end is the destination node, operations performed by the first end are similar to operations performed by above second end being the source node, and operations performed by the second end are similar to operations performed by above first end being the destination node.

[0282] In the case where both the first and second ends perform operations of data synchronization, the first end and the  second end performs the same operations, both the first end and the second end perform all operations by the above first end and second end. In this way, the synchronization process is performed in both directions simultaneously. In some case, the synchronization process is performed between three or more ends (storage systems) simultaneously, which can be referred to as the point to multi-point synchronization.

[0283] FIG. 10 shows a schematic structural diagram of a data processing apparatus according to one or more embodiments of the present disclosure. As shown in FIG. 10, the data processing apparatus 1000 may include:

[0284] a processing module 1001, configured to obtain first tree data, where the first tree data is determined while a first tree is built up according to first metadata of the first end, where the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure;

[0285] a transceiving module 1002, configured to receive second tree data from a second end, where the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second tree data includes a part of tree data corresponding to the second tree, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure; and

[0286] the processing module 1001 is further configured to identify a difference between the first metadata and the second metadata by comparing the second tree data with the first tree data.

[0287] In a possible implementation, the first tree data includes first information for indicating the first metadata in the first topology, and the second tree data includes second information for indicating the second metadata in the second topology; the processing module 1001 is further configured to:

[0288] compare the second information with the first information to obtain a comparison result; and

[0289] identify the difference between the first metadata and the second metadata according to the comparison result.

[0290] In a possible implementation, where the apparatus further includes an ordering module, configured to order the first metadata in a first preset order to obtain first ordered metadata.

[0291] In a possible implementation, the processing module 1001 is further configured to:

[0292] process metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data; and

[0293] build up the first tree according to the first tree data.

[0294] In a possible implementation, where the first information includes first metadata information and first content information, the processing module 1001 is further configured to:

[0295] determine the first metadata information for each first metadata node in the first data structure corresponding to the first ordered metadata;

[0296] determine the first metadata information and the first content information for each second metadata node in the first data structure corresponding to the first ordered metadata;

[0297] where the first content information for each second metadata node is determined according to first metadata information for a metadata node which is a child metadata node of the second metadata node;

[0298] the first tree includes a first tree node for attaching the first metadata information, and a second tree node for attaching the first metadata information and the first content information.

[0299] In a possible implementation, the second information includes second metadata information and second content information, the second metadata information is determined for each third metadata node in second ordered metadata, the second metadata information and the second content information are determined for each fourth metadata node in the second ordered metadata, the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node, and the second tree includes a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information; the processing module 1001 is further configured to:

[0300] for each third tree node, determine whether there is a first tree node whose first metadata information is matched with second metadata information of the third tree node by traversing the first tree in a second preset order, and the second  preset order is same as the first preset order;

[0301] if yes, mark the first tree node as a first state, where the first state is used for indicating that metadata corresponding to the first tree node does not need to be updated;

[0302] if not, mark the first tree node as a second state, where the second state is used for indicating that metadata corresponding to the first tree node needs to be updated.

[0303] In a possible implementation, the processing module 1001 is further configured to:

[0304] for each fourth tree node, determine whether there is a second tree node whose first metadata information and first content information are matched with second metadata information and second content information of the fourth tree node respectively by traversing the first tree in the second preset order;

[0305] if the first metadata information and first content information are matched with the second metadata information and second content information respectively, mark the second tree node as a third state, where the third state is used for indicating that metadata corresponding to the second tree node does not need to be updated; or

[0306] if the first content information is matched with the second content information, and the first metadata information is not matched with the second metadata information, mark the second tree node as a fourth state, where the fourth state is used for indicating that metadata corresponding to the second tree node needs to be updated; or

[0307] if the first metadata information is matched with the second metadata information, and the first content information is not matched with the second content information, compare whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node, and marking the second tree node as a fifth state, where the fifth state is used for indicating that the next level tree node under the second tree node needs to be compared; or

[0308] if the first metadata information is not matched with the second metadata information, and the first content information is not matched with the second content information, check other fourth tree nodes in the second tree.

[0309] In a possible implementation, the processing module 1001 is further configured to:

[0310] determine whether there is a further fourth tree node whose second content information is matched with the first content information of the second tree node by traversing the second tree,

[0311] if yes, mark the second tree node as the fourth state;

[0312] if not, mark the second tree node as a sixth state, where the sixth state is used for indicating that the fourth tree node does not match with the second tree node.

[0313] In a possible implementation, the processing module 1001 is further configured to, when the first tree node is marked as the second state, add the third tree node to a first set, and when the second tree node is marked as the sixth state, add the fourth tree node to the first set.

[0314] In a possible implementation, the processing module 1001 is further configured to:

[0315] for each third tree node in the first set, determine whether there is a further first tree node whose first metadata information is matched with second metadata information of the third tree node;

[0316] if yes, determine metadata corresponding to the further first tree node as metadata corresponding to the third tree node;

[0317] if not, request metadata corresponding to the third tree node from the second end.

[0318] In a possible implementation, the processing module 1001 is further configured to:

[0319] for each fourth tree node in the first set, determine whether there is a further second tree node whose first content information is matched with second content information of the fourth tree node;

[0320] if yes, determine metadata corresponding to the further second tree node as metadata corresponding to the fourth tree node;

[0321] if not, determine whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node.

[0322] In a possible implementation, where the first metadata information is a hash of metadata corresponding to the first metadata node, and / or a hash of metadata corresponding to the second metadata node; the first content information is a hash  obtained from a hash of metadata corresponding to a child metadata node of the second metadata node; and the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.

[0323] In a possible implementation, the processing module 1001 is further configured to: traverse a first tree in which a node is marked, to obtain a change list.

[0324] In a possible implementation, the processing module 1001 is further configured to:

[0325] for each first tree node, determine whether the first tree node is marked;

[0326] if yes, determine whether the first tree node is marked as the first state or the second state, if the first tree node is marked as the first state, skip the first tree node; if the first tree node is marked as the second state, add the first tree node to the change list as a first entry;

[0327] if not, add the first tree node to the change list as a second entry.

[0328] In a possible implementation, the processing module 1001 is further configured to:

[0329] for each second tree node, determine whether the second tree node is marked;

[0330] if yes, and the second tree node is marked as the third state, skip the second tree node; or, if yes, and the second tree node is marked as the fourth state or the sixth state, add the second tree node to the change list as a third entry; or, if yes, and the second tree node is marked as the fifth state, traverse a child node of the second tree node to determine which child node is not matched;

[0331] if not, add the second tree node to the change list as a second entry.

[0332] In a possible implementation, the second tree node includes a group node, the first tree node includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0333] In a possible implementation, the first tree further includes a bundle node representing a node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0334] In a possible implementation, the transceiving module 1002 is configured to receive a packet including the second tree data from the second end.

[0335] In a possible implementation, both the first data structure and the second data structure are N-ary tree structures, and N is a positive integer greater than or equal to 1.

[0336] In a possible implementation, the processing module 1001 is further configured to synchronize the first metadata with the second metadata according to the difference between the first metadata and the second metadata.

[0337] In a possible implementation, the processing module 1001 is further configured to determine a second set to be sent to the second end, where the second set includes all changes to the first metadata.

[0338] In a possible implementation, the first topology of the first tree corresponds to the second topology of the second tree.

[0339] In a possible implementation, the processing module 1001 is further configured to obtain, by a data processing component in the first end, the first tree data.

[0340] In a possible implementation, the data processing component includes a processor or an accelerator.

[0341] In a possible implementation, the first end is a destination end and the second end is a source end.

[0342] In a possible implementation, the transceiving module 1002 is configured to transmit a data processing request to the second end.

[0343] FIG. 11 shows a schematic structural diagram of a data processing apparatus according to one or more embodiments of the present disclosure. As shown in FIG. 11, the data processing apparatus 1100 may include:

[0344] a processing module 1101, configured to obtain second tree data, where the second tree data is determined while a second tree is built up according to second metadata of the second end, where the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure, where the second tree data includes a part of tree data corresponding to the second tree;

[0345] a transceiving module 1102, configured to transmit the second tree data to a first end.

[0346] In a possible implementation, the second tree data includes second information for indicating the second metadata in the second topology.

[0347] In a possible implementation, the processing module 1101 is further configured to order the second metadata in a first preset order to obtain second ordered metadata.

[0348] In a possible implementation, the processing module 1101 is further configured to:

[0349] process metadata nodes in a second data structure corresponding to the second ordered metadata to obtain the second tree data; and

[0350] build up the second tree according to the second tree data.

[0351] In a possible implementation, the second information includes second metadata information and second content information, the processing module 1101 is further configured to:

[0352] determine the second metadata information for each third metadata node in the second data structure corresponding to the second ordered metadata;

[0353] determine the second metadata information and the second content information for each fourth metadata node in the second data structure corresponding to the second ordered metadata;

[0354] where the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node;

[0355] the second tree includes a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information.

[0356] In a possible implementation, the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.

[0357] In a possible implementation, the fourth tree node includes a group node, the third tree node includes an item node, the group node represents a node with a child node, and the item node represents a node without a child node.

[0358] In a possible implementation, the second tree further includes a bundle node representing a node under a given group node, and the bundle node includes a configured number of group node and / or item node.

[0359] In a possible implementation, the transceiving module 1102 is further configured to transmit a packet including the second tree data to the first end.

[0360] In a possible implementation, the second data structure is an N-ary tree structure, and N is a positive integer greater than or equal to 1.

[0361] In a possible implementation, the processing module 1101 is further configured to determine a second set to be sent to the first end, where the second set includes all changes to the second metadata.

[0362] In a possible implementation, the processing module 1101 is further configured to obtain, by a data processing component in the second end, the second tree data.

[0363] In a possible implementation, the data processing component includes a processor or an accelerator.

[0364] In a possible implementation, the second end is a source end and the first end is a destination end.

[0365] In a possible implementation, the transceiving module 1102 is further configured to receive a data processing request from the first end.

[0366] It should be understood by a person skilled in the art that, the relevant description of the above modules in the possible implementations of the present disclosure may be understood with reference to the relevant description of the data processing methods in the possible implementations of the present disclosure. The technical effects achieved by the above apparatuses are similar as those achieved by the above corresponding method embodiments, which is not repeated herein.

[0367] FIG. 12 is a structural diagram of an electronic device according to one or more embodiments of the present disclosure, the electronic device may be a first end or a second end. As shown in FIG. 12, the electronic device 1200 may include: a processor 1201 coupled to a memory 1202 in a communicative way via an interface 1203; where the memory 1202  stores a computer executable instruction; the processor 1201 executes the computer executable instruction stored in the memory 1202 for executing any of the above data processing methods. It should be noted that, the memory 1202 may be included or excluded from the electronic device, depending on actual needs.

[0368] In a possible implementation, the electronic device may include a transceiver, a processor, and a memory. The memory may be configured to store code, instructions, and the like executed by the processor.

[0369] It should be understood that the processor may be an integrated circuit chip and has a data processing capability. In an implementation process, steps of the foregoing method embodiments may be completed by using a hardware integrated logic circuit in the processor, or by using instructions in a form of software. The processor may be a general-purpose processor, a central processing unit (CPU) , a graphics processing unit (GPU) , a neural processing unit (NPU) , a system on chip (SoC) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor may implement or perform the methods, the steps, and the logical block diagrams that are disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like. The steps of the methods disclosed with reference to the embodiments of the present disclosure may be directly performed and completed by a hardware decoding processor, or may be performed and completed by using a combination of hardware in the decoding processor and a software module. The software module may be located in a mature storage medium in the art, such as a random-access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory, and the processor reads information in the memory and completes the steps of the foregoing methods in combination with hardware in the processor.

[0370] It may be understood that the memory in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. The non-volatile memory may be a read-only memory (Read-Only Memory, ROM) , a programmable read-only memory (Programmable ROM, PROM) , an erasable programmable read-only memory (Erasable PROM, EPROM) , an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) , or a flash memory. The volatile memory may be a random-access memory (Random Access Memory, RAM) and is used as an external cache. By way of example rather than limitation, many forms of RAMs may be used, and are, for example, a static random access memory (Static RAM, SRAM) , a dynamic random access memory (Dynamic RAM, DRAM) , a synchronous dynamic random access memory (Synchronous DRAM, SDRAM) , a double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM) , an enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM) , a synchronous link dynamic random access memory (Synchronous link DRAM, SLDRAM) , and a direct rambus random access memory (Direct Rambus RAM, DR RAM) .

[0371] It should be noted that the memory described in this specification includes but is not limited to these memories and could be a memory of any other appropriate type.

[0372] An embodiment of the present disclosure provides a computing device cluster, including a processing circuitry for performing any of the above data processing methods.

[0373] An embodiment of the present disclosure provides a chip, including an input / output (I / O) interface and a processor, where the processor is configured to call and run a computer program stored in a memory, to enable a device installing with the chip to perform any of the above data processing methods.

[0374] An embodiment of the present disclosure provides a computer-readable medium storing computer execution instructions which, when executed by a processor, causes the processor to execute any of the above data processing methods. Optionally, the storage medium may be specifically a memory.

[0375] An embodiment of the present disclosure provides a computer program product including computer execution instructions which, when executed by a processor, causes the processor to execute any of the above data processing methods.

[0376] An embodiment of the present disclosure provides a computer program including computer execution instructions which, when executed by a processor, causes the processor to execute any of the above data processing methods.

[0377] A person of ordinary skill in the art may be aware that, in combination with the examples described in the  embodiments disclosed in this specification, units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this disclosure.

[0378] In the several embodiments provided in this disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

[0379] The units described as separate parts may be or may not be physically separate, and parts displayed as units may be or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0380] In addition, functional units in the embodiments of this disclosure may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

[0381] When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer readable storage medium. Based on such an understanding, the technical solutions in this disclosure essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of this disclosure. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (Read-Only Memory, ROM) , a random-access memory (Random Access Memory, RAM) , a magnetic disk, or an optical disc.

[0382] Although the present disclosure describes methods and processes with steps in a certain order, one or more steps of the methods and processes may be omitted or altered as appropriate. One or more steps may take place in an order other than that in which they are described, as appropriate.

[0383] In this disclosure, “at least one” means one or more, and “a plurality of” means two or more. “and / or” describes an association relationship of associated objects, and indicates that there may be three relationships. For example, A and / or B may indicate cases includes “only A” , “both A and B” , and “only B” , where A and B may be singular or plural. The character “ / ” generally indicates that the associated objects are in an OR relationship. “At least one of the following items” or a similar expression thereof refers to any combination of these items, including any combination of a single item or a plurality of items. For example, “at least one of a, b, or c” may represent a, b, c, “a and b” , “a and c” , “b and c” , or “a, b and c” , where a, b, and c may be a single or multiple form.

[0384] Although the present disclosure is described, at least in part, in terms of methods, a person of ordinary skill in the art will understand that the present disclosure is also directed to the various components for performing at least some of the aspects and features of the described methods, be it by way of hardware components, software or any combination of the two. Accordingly, the technical solution of the present disclosure may be embodied in the form of a software product. A suitable software product may be stored in a pre-recorded storage device or other similar non-volatile or non-transitory computer readable medium, including DVDs, CD-ROMs, USB flash disk, a removable hard disk, or other storage media, for example. The software product includes instructions tangibly stored thereon that enable a processing device (e.g., a personal computer, a server, or a network device) to execute examples of the methods disclosed herein. The machine-executable instructions may be in the form of code sequences, configuration information, or other data, which, when executed, cause a machine (e.g., a  processor or other processing device) to perform steps in a method according to examples of the present disclosure.

[0385] The present disclosure may be embodied in other specific forms without departing from the subject matter of the claims. The described example embodiments are to be considered in all respects as being only illustrative and not restrictive. Selected features from one or more of the above-described embodiments may be combined to create alternative embodiments not explicitly described, features suitable for such combinations being understood within the scope of this disclosure.

Claims

1.A data processing method, applied to a first end, the method comprises:obtaining first tree data, wherein the first tree data is determined while a first tree is built up according to first metadata of the first end, wherein the first metadata has a first data structure, and the first tree has a first topology corresponding to the first data structure;receiving second tree data from a second end, wherein the second tree data is determined while a second tree is built up according to second metadata of the second end by the second end, and the second tree data comprises a part of tree data corresponding to the second tree, wherein the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure; andidentifying a difference between the first metadata and the second metadata by comparing the second tree data with the first tree data.2.The method according to claim 1, wherein the first tree data comprises first information for indicating the first metadata in the first topology, and the second tree data comprises second information for indicating the second metadata in the second topology;the identifying the difference between the first metadata and the second metadata by comparing the second tree data with the first tree data comprises:comparing the second information with the first information to obtain a comparison result; andidentifying the difference between the first metadata and the second metadata according to the comparison result.3.The method according to claim 2, wherein before the obtaining the first tree data, the method further comprises:ordering the first metadata in a first preset order to obtain first ordered metadata.4.The method according to claim 3, wherein the building up of the first tree according to the first metadata of the first end comprises:processing metadata nodes in a first data structure corresponding to the first ordered metadata to obtain the first tree data; andbuilding up the first tree according to the first tree data.5.The method according to claim 4, wherein the first information comprises first metadata information and first content information, the processing the metadata nodes in the first data structure corresponding to the first ordered metadata to obtain the first tree data comprises:determining the first metadata information for each first metadata node in the first data structure corresponding to the first ordered metadata;determining the first metadata information and the first content information for each second metadata node in the first data structure corresponding to the first ordered metadata;wherein the first content information for each second metadata node is determined according to first metadata information for a metadata node which is a child metadata node of the second metadata node;the first tree comprises a first tree node for attaching the first metadata information, and a second tree node for attaching the first metadata information and the first content information.6.The method according to claim 5, wherein the second information comprises second metadata information and second content information, the second metadata information is determined for each third metadata node in second ordered metadata, the second metadata information and the second content information are determined for each fourth metadata node in the second ordered metadata, the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node, and the second tree comprises a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information;the comparing the second information with the first information to obtain the comparison result comprises:for each third tree node, determining whether there is a first tree node whose first metadata information is matched with second metadata information of the third tree node by traversing the first tree in a second preset order, and the second preset order is same as the first preset order;if yes, marking the first tree node as a first state, wherein the first state is used for indicating that metadata corresponding to the first tree node does not need to be updated;if not, marking the first tree node as a second state, wherein the second state is used for indicating that metadata corresponding to the first tree node needs to be updated.7.The method according to claim 6, wherein the comparing the second information with the first information to obtain the comparison result comprises further comprises:for each fourth tree node, determining whether there is a second tree node whose first metadata information and first content information are matched with second metadata information and second content information of the fourth tree node respectively by traversing the first tree in the second preset order;if the first metadata information and first content information are matched with the second metadata information and second content information respectively, marking the second tree node as a third state, wherein the third state is used for indicating that metadata corresponding to the second tree node does not need to be updated; orif the first content information is matched with the second content information, and the first metadata information is not matched with the second metadata information, marking the second tree node as a fourth state, wherein the fourth state is used for indicating that metadata corresponding to the second tree node needs to be updated; orif the first metadata information is matched with the second metadata information, and the first content information is not matched with the second content information, comparing whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node, and marking the second tree node as a fifth state, wherein the fifth state is used for indicating that the next level tree node under the second tree node needs to be compared; orif the first metadata information is not matched with the second metadata information, and the first content information is not matched with the second content information, checking other fourth tree nodes in the second tree.8.The method according to claim 7, wherein checking the other fourth tree nodes in the second tree comprises:determining whether there is a further fourth tree node whose second content information is matched with the first content information of the second tree node by traversing the second tree,if yes, marking the second tree node as the fourth state;if not, marking the second tree node as a sixth state, wherein the sixth state is used for indicating that the fourth tree node does not match with the second tree node.9.The method according to claim 8, wherein when the first tree node is marked as the second state, the method further comprises adding the third tree node to a first set, and when the second tree node is marked as the sixth state, the method further comprises adding the fourth tree node to the first set.10.The method according to claim 9, further comprising:for each third tree node in the first set, determining whether there is a further first tree node whose first metadata information is matched with second metadata information of the third tree node;if yes, determining metadata corresponding to the further first tree node as metadata corresponding to the third tree node;if not, requesting metadata corresponding to the third tree node from the second end.11.The method according to claim 9 or 10, further comprising:for each fourth tree node in the first set, determining whether there is a further second tree node whose first content information is matched with second content information of the fourth tree node;if yes, determining metadata corresponding to the further second tree node as metadata corresponding to the fourth tree node;if not, determining whether a next level tree node under the fourth tree node matches a next level tree node under the second tree node.12.The method according to any one of claims 6 to 11, wherein the first metadata information is a hash of metadata corresponding to the first metadata node, and / or a hash of metadata corresponding to the second metadata node; the first content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the second metadata node; and the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.13.The method according to claim 11 or 12, further comprising:traversing a first tree in which a node is marked, to obtain a change list.14.The method according to claim 13, wherein the traversing the first tree in which the node is marked, to obtain the change list comprises:for each first tree node, determining whether the first tree node is marked;if yes, determining whether the first tree node is marked as the first state or the second state, if the first tree node is marked as the first state, skipping the first tree node; if the first tree node is marked as the second state, adding the first tree node to the change list as a first entry;if not, adding the first tree node to the change list as a second entry.15.The method according to claim 13 or 14, wherein the traversing the first tree in which the node is marked, to obtain the change list comprises:for each second tree node, determining whether the second tree node is marked;if yes, and the second tree node is marked as the third state, skipping the second tree node; or, if yes, and the second tree node is marked as the fourth state or the sixth state, adding the second tree node to the change list as a third entry; or, if yes, and the second tree node is marked as the fifth state, traversing a child node of the second tree node to determine which child node is not matched;if not, adding the second tree node to the change list as a second entry.16.The method according to any one of claims 5 to 15, wherein the second tree node comprises a group node, the first tree node comprises an item node, the group node represents a node with a child node, and the item node represents a node without a child node.17.The method according to claim 16, wherein the first tree further comprises a bundle node representing a node under a given group node, and the bundle node comprises a configured number of group node and / or item node.18.The method according to any one of claims 1 to 17, wherein the receiving the second tree data from the second end comprises:receiving a packet comprising the second tree data from the second end.19.The method according to any one of claims 1 to 18, wherein both the first data structure and the second data structure are N-ary tree structures, and N is a positive integer greater than or equal to 1.20.The method according to any one of claims 1 to 19, further comprising:synchronizing the first metadata with the second metadata according to the difference between the first metadata and the second metadata.21.The method according to any one of claims 1 to 20, wherein before the obtaining the first tree data, the method further comprises:determining a second set to be sent to the second end, wherein the second set comprises all changes to the first metadata.22.The method according to any one of claims 1 to 21, wherein the first topology of the first tree corresponds to the second topology of the second tree.23.The method according to any one of claims 1 to 22, wherein the obtaining the first tree data comprises:obtaining, by a data processing component in the first end, the first tree data.24.The method according to claim 23, wherein the data processing component comprises a processor or an accelerator.25.The method according to any one of claims 1 to 24, wherein the first end is a destination end and the second end is a  source end.26.The method according to any one of claims 1 to 25, further comprising:transmitting a data processing request to the second end.27.A data processing method, applied to a second end, the method comprises:obtaining second tree data, wherein the second tree data is determined while a second tree is built up according to second metadata of the second end, wherein the second metadata has a second data structure, and the second tree has a second topology corresponding to the second data structure, wherein the second tree data comprises a part of tree data corresponding to the second tree;transmitting the second tree data to a first end.28.The method according to claim 27, wherein the second tree data comprises second information for indicating the second metadata in the second topology.29.The method according to claim 28, wherein before the obtaining the second tree data, the method further comprises:ordering the second metadata in a first preset order to obtain second ordered metadata.30.The method according to claim 29, wherein the building up of the second tree according to the second metadata of the second end comprises:processing metadata nodes in a second data structure corresponding to the second ordered metadata to obtain the second tree data; andbuilding up the second tree according to the second tree data.31.The method according to claim 30, wherein the second information comprises second metadata information and second content information, the processing the metadata nodes in the second data structure corresponding to the second ordered metadata to obtain the second tree data comprises:determining the second metadata information for each third metadata node in the second data structure corresponding to the second ordered metadata;determining the second metadata information and the second content information for each fourth metadata node in the second data structure corresponding to the second ordered metadata;wherein the second content information for each fourth metadata node is determined according to second metadata information for a metadata node which is a child metadata node of the fourth metadata node;the second tree comprises a third tree node for attaching the second metadata information, and a fourth tree node for attaching the second metadata information and the second content information.32.The method according to claim 31, wherein the second metadata information is a hash of metadata corresponding to the third metadata node, and / or a hash of metadata corresponding to the fourth metadata node; the second content information is a hash obtained from a hash of metadata corresponding to a child metadata node of the fourth metadata node.33.The method according to claim 32, wherein the fourth tree node comprises a group node, the third tree node comprises an item node, the group node represents a node with a child node, and the item node represents a node without a child node.34.The method according to claim 33, wherein the second tree further comprises a bundle node representing a node under a given group node, and the bundle node comprises a configured number of group node and / or item node.35.The method according to any one of claims 27 to 34, wherein the transmitting the second tree data to the first end comprises:transmitting a packet comprising the second tree data to the first end.36.The method according to any one of claims 27 to 35, wherein the second data structure is an N-ary tree structure, and N is a positive integer greater than or equal to 1.37.The method according to any one of claims 27 to 36, wherein before the obtaining the second tree data, the method further comprises:determining a second set to be sent to the first end, wherein the second set comprises all changes to the second metadata.38.The method according to any one of claims 27 to 37, wherein the obtaining the second tree data comprises:obtaining, by a data processing component in the second end, the second tree data.39.The method according to claim 38, wherein the data processing component comprises a processor or an accelerator.40.The method according to any one of claims 27 to 39, wherein the second end is a source end and the first end is a destination end.41.The method according to any one of claims 27 to 40, further comprising:receiving a data processing request from the first end.42.A data processing apparatus, comprising at least one processor and a memory, wherein the memory stores instructions that enable the at least one processor to execute the method according to any one of claims 1 to 26.43.A data processing apparatus, comprising at least one processor and a memory, wherein the memory stores instructions that enable the at least one processor to execute the method according to any one of claims 27 to 41.44.A first end, comprising at least one processor coupled to a memory storing a set of instructions;wherein the at least one processor is configured to read the set of instructions in the memory and execute the method according to any one of claims 1 to 26.45.A second end, comprising at least one processor coupled to a memory storing a set of instructions;wherein the at least one processor is configured to read the set of instructions in the memory and execute the method according to any one of claims 27 to 41.46.A data processing system, comprising a first end and a second end, wherein the first end is used to execute the method according to any one of claims 1 to 26, and the second end is used to execute the method according to any one of claims 27 to 41.47.A computing device cluster, comprising a processing circuitry for performing the method according to any one of claims 1 to 26 or the method according to any one of claims 27 to 41.48.A computer program product comprising program code for performing the method according to any one of claims 1 to 26 or the method according to any one of claims 27 to 41.49.A computer program comprising computer execution instructions which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 26 or the method according to any one of claims 27 to 41.50.A computer-readable medium storing computer execution instructions which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 26 or the method according to any one of claims 27 to 41.51.A chip, comprising an input / output (I / O) interface and a processor, wherein the processor is configured to call and run a computer program stored in a memory, to enable a device installing with the chip to perform the method according to any one of claims 1 to 26 or the method according to any one of claims 27 to 41.