Method, device and equipment for data synchronization, medium and program product
By grouping and selectively transmitting data items in the data center network, the problems of high latency and redundant transmission of data synchronization in large-scale data center networks are solved, efficient and flexible data synchronization is achieved, and real-time synchronization of switch control plane information is met.
Patent Information
- Application Number
- CN202510773380.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-08
AI Technical Summary
In large-scale data center networks, existing data synchronization technologies have problems such as high synchronization delay, excessive network load, redundant data transmission, high complexity, and inability to meet real-time messaging requirements. Especially when information synchronization of switch control surface information, it is difficult to achieve efficient, flexible and selective data synchronization.
By determining the data items to be synchronized and their metadata at the data transmission device, and selectively transmitting key-value pairs to peer nodes based on the transmission rules of the data center network, the packet storage and directional synchronization of the data items are realized, redundant data transmission is reduced, and synchronization efficiency is improved.
It realizes efficient and flexible data synchronization in large-scale data center networks, reduces network load and delay, meets the real-time synchronization requirements of switch control surface information, and improves the synchronization efficiency and consistency of data transmission equipment.
Smart Images

Figure CN120455474A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, apparatuses, devices, computer-readable storage media, and computer program products for data synchronization. Background Art
[0002] In large-scale data center networks, data synchronization is typically the process of maintaining data consistency and timeliness across different nodes (e.g., servers) within the data center network. This is particularly important in large-scale network environments because, as computational workloads and data volumes increase, ensuring data synchronization across nodes in different physical locations becomes increasingly complex and critical. Data synchronization can be used to ensure data consistency across different nodes, avoid data conflicts and errors, and ensure the uniformity and reliability of the system's overall data. Through data synchronization, the system can improve fault tolerance and reliability. For example, even if a node fails, other nodes can still provide the latest data, ensuring high availability. However, as data volume and business complexity increase, data synchronization becomes increasingly complex. Therefore, choosing the appropriate synchronization strategies and technologies for different application scenarios has become a crucial factor in designing efficient and reliable large-scale data center networks. Summary of the Invention
[0003] In a first aspect of the present disclosure, a method for data synchronization is provided. In the method, a data item to be synchronized is determined at a first data transmission device in a data center network, the data item to be synchronized comprising a data value and metadata associated with the data value, the data item to be synchronized belonging to a first group of data items, the first group of data items being associated with at least one data transmission device in the data center network; and transmission information of the data item to be synchronized with respect to the at least one data transmission device is determined based on a data transmission rule for the data center network.
[0004] In a second aspect of the present disclosure, an apparatus for data synchronization is provided. The apparatus includes: a data item determination module configured to determine, at a first data transmission device in a data center network, a data item to be synchronized, wherein the data item to be synchronized includes a data value and metadata associated with the data value, and the data item to be synchronized belongs to a first group of data items, wherein the first group of data items is associated with at least one data transmission device in the data center network; and a transmission information determination module configured to determine, based on a data transmission rule for the data center network, transmission information of the data item to be synchronized with respect to the at least one data transmission device.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. When executed by the at least one processor, the instructions cause the device to perform the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
[0007] In a fifth aspect of the present disclosure, a computer program product is provided, which is tangibly stored in a computer storage medium and includes computer-executable instructions, which, when executed by a device, cause the device to perform the method of the first aspect.
[0008] It should be understood that the content described in this summary section is not intended to limit the key features or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram illustrating an example environment in which embodiments according to the present disclosure may be implemented;
[0011] Figure 2 A schematic diagram illustrating grouping of data items according to some embodiments of the present disclosure is shown;
[0012] Figure 3 A schematic diagram illustrating the transmission of data items in a data network according to some embodiments of the present disclosure is shown;
[0013] Figure 4A A schematic diagram illustrating a key-value pair storage format according to some embodiments of the present disclosure is shown;
[0014] Figure 4B shows metadata according to some embodiments of the present disclosure;
[0015] Figure 5 A schematic diagram illustrating communication messages between nodes according to some embodiments of the present disclosure is shown;
[0016] Figure 6 A schematic diagram of an inner message header according to some embodiments of the present disclosure is shown;
[0017] Figure 7 A flowchart of a method for data synchronization according to some embodiments of the present disclosure is shown;
[0018] Figure 8 shows a state machine according to some embodiments of the present disclosure;
[0019] Figure 9 A schematic structural block diagram of an apparatus for data synchronization according to certain embodiments of the present disclosure is shown; and
[0020] Figure 10 A block diagram of a device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0021] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0022] It should be noted that the titles of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and any type of embodiment may be included under any section / subsection. Furthermore, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or in different sections / subsections.
[0023] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0024] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects shall comply with the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user is aware of and confirms them. Accordingly, when implementing the various embodiments of the present disclosure, the types, scope of use, and usage scenarios of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method may vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.
[0025] In the embodiments of this disclosure, if the processing of personal information is involved, it will be done only with a legitimate basis (such as with the consent of the personal information subject or as necessary for the performance of a contract) and only within the prescribed or agreed scope. A user's refusal to process personal information other than that required for basic functions will not affect the user's use of basic functions.
[0026] In large-scale data center networks, the control planes of switches need to synchronize and share a large amount of information. For example, when the status of a link in the network changes, the switch connected to that link detects the new link status and needs to synchronize this information with other switches so that the entire network can promptly adjust its traffic forwarding strategy. In this case, link status information must be synchronized to the relevant switches within milliseconds or even microseconds. If the synchronization latency is too high, the network will not be able to respond to link status changes in a timely manner, affecting load balancing. In addition, link status may change frequently, and each switch may generate status updates, which need to be quickly propagated across multiple switches. Furthermore, not all switches need to know the status of all links. The scope of information synchronization should be flexibly divided according to the network topology and service needs, and the overhead caused by unnecessary data synchronization should be avoided.
[0027] In terms of configuration management, specific configurations must be consistent across different switches. Configuration updates must be reliably synchronized to all relevant devices to avoid network anomalies caused by inconsistent configurations. Switches in different regions or roles may have different configurations, so the synchronization scope must be divided into management domains, and configuration updates must be propagated within a specified range.
[0028] For the convenience of explanation, the following Figure 1 The data network environment 100 in the example is discussed. Specifically, Figure 1FIG1 shows a schematic diagram of an example data network environment 100. In the example data network environment 100, a data center network 101 may include multiple nodes, such as servers, switches, and other devices that may perform data transmission, data storage devices, control devices, and / or other appropriate devices. In the embodiments of the present disclosure, devices that may perform data transmission are also referred to as data transmission devices, such as Figure 1 As shown, data center network 101 may include data transmission devices 110, 120, 130, and 140. Data transmission device 110 may send information to data transmission device 120 and data transmission device 130, and data transmission device 120 may send information to data transmission device 140. In a data center network, a data transmission device may be a node. Data transmission devices may be, for example, servers, switches, gateways, and other devices. Two data transmission devices that have established a synchronization relationship may be considered peer nodes. For example, in data center network 101, data transmission device 110 is a peer node of data transmission device 120, and data transmission device 120 is also a peer node of data transmission device 110. Similarly, data transmission device 110 is a peer node of data transmission device 130, and data transmission device 130 is also a peer node of data transmission device 110. Similarly, data transmission device 140 and data transmission device 120 are each each other's peer nodes.
[0029] It should be understood that the example of the data center network 101 described in this disclosure is for illustrative purposes only and is not intended to limit the embodiments of this disclosure in any way. The data center network in the embodiments of this disclosure may include any suitable number of data transmission devices and / or have any suitable topology, and the embodiments of this disclosure do not impose any limitations on this.
[0030] In such Figure 1 In the data center network 101 shown, data synchronization can be performed between data transmission devices 110, 120, 130, and 140. For example, a large amount of information may need to be synchronized on the control planes of the data transmission devices 110, 120, 130, and 140, and the configurations of the data transmission devices 110, 120, 130, and 140 may need to be consistent.
[0031] In conventional solutions, data synchronization may involve routing protocols. In a routing protocol-based solution, each node periodically sends routing updates to its neighboring nodes. Upon receiving the routing updates, the neighboring nodes can calculate the optimal route using a predefined optimal path algorithm. In this way, routing updates are propagated hop by hop between nodes until routing convergence is achieved, completing propagation throughout the data center network.
[0032] Conventional solutions using routing protocols often focus solely on the dissemination of routing information, making them difficult to extend for other types of control plane information. Furthermore, due to a lack of support for data partitioning, routing protocols may be unable to control the dissemination and sharing of information based on actual needs. Due to a fixed update trigger mechanism, data transmission devices in conventional solutions cannot adapt their update strategies to different types of control plane information. Furthermore, the fixed message format design in these conventional solutions makes it difficult to adapt to new control plane functional requirements.
[0033] In addition, data synchronization may involve randomized propagation protocols. These protocols support data synchronization by randomly selecting neighbor nodes. Each node periodically selects one or more randomized neighbor nodes for state exchange. Nodes exchange all known data and merge their state information. Based on the randomized propagation protocol, this state information is ultimately propagated to the entire network.
[0034] While data synchronization based on random propagation protocols can ultimately achieve network-wide data synchronization, the time required for this process is uncertain. Furthermore, nodes exchange complete state information rather than incremental updates, which results in a significant amount of redundant data transmission in large-scale networks. Furthermore, data propagates in all directions, making its reach uncertain.
[0035] Centralized data synchronization can also be used in conventional solutions. For example, a central node is set up in the network to manage and coordinate the synchronization of all data. Other nodes send data updates to the central node, which verifies and processes them. The central node then distributes the updated data to the nodes that need to receive it.
[0036] However, this solution presents a single point of failure risk. If a central node fails, data synchronization across many nodes in the data center network will be affected. The central node's performance can become a bottleneck in the data center network. Furthermore, since all switches need to communicate with the central node, the network load increases.
[0037] Data synchronization can also involve distributed message-based data dissemination. In this approach, each node maintains multiple send and receive buffers for exchanging messages with other nodes. When a node needs to send a message, it places the message in the send buffer of the corresponding target node and sends the message via a reliable transport protocol. The receiving node stores the received message in the receive buffer, processes the messages in a predefined order, and sends an acknowledgment of the processing results.
[0038] Such solutions suffer from over-engineered functionality, such as complex message grouping and prioritization mechanisms. Switch control planes typically require only simple status updates. To ensure high reliability and consistency, these solutions often incorporate complex confirmation mechanisms or retry logic. While these mechanisms ensure message loss, they increase system complexity. The performance of such solutions may not meet control plane requirements. Furthermore, since these solutions are typically designed for high throughput at the expense of increased latency, they cannot meet the demands of real-time messaging.
[0039] Data synchronization can also involve distributed in-memory database solutions. For example, one or more master nodes in the system act as in-memory database servers to store all data. Other nodes, acting as clients, receive data updates from the master node through a subscription mechanism. When data changes, the master node handles the update request and notifies all subscribed clients of the change.
[0040] In this scenario, the problem of over-engineering functionality leads to excessive complexity and unnecessary computational overhead. For example, distributed in-memory databases typically support complex data structures and operations, whereas in switch control plane scenarios, the primary task is simple, high-frequency state synchronization and updates. Furthermore, switches cannot efficiently share the same database. If the database is centralized, all switches must continuously communicate with a single database node, causing network congestion and latency issues around that node. If the database is distributed, the problems of a centralized setup persist, as only a few switches typically hold a subset of the complete data. Hotspots of data access and synchronization will form in the network, leading to network congestion and latency issues around these hotspots.
[0041] As mentioned above, in large-scale data center networks, the control plane requires an efficient mechanism for all nodes to share and synchronize information. This mechanism must support data storage in the form of key-value pairs and allow participating switches to access a consistent set of data. Furthermore, given the scale and complexity of data center networks, this mechanism must also support selective and directed synchronization, allowing different switches to synchronize different ranges of data based on actual needs.
[0042] Specifically, the primary issue that needs to be addressed is data isolation. Different types of control plane information require different distribution ranges. A single switch only needs to store and synchronize a subset of data relevant to it, rather than the complete status information of all switches in the network. When a switch generates or updates certain status information, the system needs to reliably distribute this information to other relevant switches. This distribution process can be selective to avoid unnecessary network messages. Furthermore, congestion in the control plane network must be avoided.
[0043] Furthermore, the speed at which control plane information is transmitted between participating switches must be high. The data synchronization solution must ensure that all switches sharing a data item have access to the same information after it is updated by a node. Given the scale of data center networks, this solution must be capable of large-scale deployments. Specifically, it must support thousands of nodes while maintaining performance, efficiently process large amounts of key-value data, and achieve these functions within limited switch resources.
[0044] To at least partially address the above-mentioned problems and other potential problems, an embodiment of the present disclosure proposes a solution for data synchronization. In this solution, a data transmission device of a data center network determines a data item to be synchronized. Then, based on the data transmission rules for the data center network, the data transmission device determines transmission information of the data item to be synchronized with respect to at least one data transmission device. The data item to be synchronized includes a data value and metadata associated with the data value. The data item to be synchronized belongs to a group of data items, and the group of data items is associated with at least one data transmission device. In this way, data synchronization can be flexibly and effectively performed between data transmission devices of a data center network, thereby improving the data synchronization efficiency of the data transmission devices.
[0045] The following will be combined Figure 2-Figure 8 Describe the solution for data synchronization according to some embodiments of the present disclosure. Figure 1 The data center network 101 is used as an example for discussion. In the data center network 101, the data transmission devices 110, 120, 130, and 140 may include or be implemented as switches, and any one of the data transmission devices 110, 120, 130, and 140 may execute the data synchronization method of the embodiment of the present disclosure.
[0046] Figure 2 Schematic diagram 200 of grouping data items according to some embodiments of the present disclosure is shown. Figure 2 In the example, a key-value pair can be a way to implement a data item. A key-value pair includes a key and a value corresponding to the key. Figure 2As shown, multiple (e.g. 5) key-value pairs will be used for data synchronization. Figure 2 In the example, the five key-value pairs include key-value pairs 201, 202, 203, 204, and 205.
[0047] In some exemplary embodiments, each data transmission device may include one or more areas, and each area may be a logical unit of a group (one or more) of data items to be synchronized. Figure 2 As shown, key-value pairs 201, 202, and 203 belong to the first group of data items, also referred to as the first group of key-value pairs. Data items 204 and 205 belong to the second group of data items, also referred to as the second group of key-value pairs. Figure 2 As shown, the first group of key-value pairs (including key-value pairs 201 , 202 , and 203 ) corresponds to region 0 , and the second group of key-value pairs (including key-value pairs 204 and 205 ) corresponds to region 1 .
[0048] In this way, data items (eg, key-value pairs) can be grouped and stored in data transmission devices, thereby improving the efficiency of updating data items to be synchronized (eg, key-value pairs to be synchronized) between data transmission devices.
[0049] It should be understood that the examples of key-value pair grouping described in this disclosure are for illustrative purposes only and are not intended to limit the embodiments of the present disclosure in any way. The embodiments of the present disclosure may include any suitable number of key-value pairs and / or any number of data transmission devices, and the embodiments of the present disclosure may include any suitable key-value pair grouping method, and the embodiments of the present disclosure do not impose any limitation on this.
[0050] Figure 3 A schematic diagram 300 is shown of data item transmission in a data network according to some embodiments of the present disclosure. Figure 3 The data network in can be Figure 1 An implementation of the data network 101 in FIG. Figure 3 The data network in the embodiment includes a first node 310, a second node 320 and a third node 330. The first node 310 may be Figure 1 In one implementation of the data transmission device 110, the second node 320 may be Figure 1 An implementation of the data transmission device 120, and the third node 330 may be Figure 1 In some exemplary embodiments, bidirectional communication can be performed between the first node 310 and the second node 320. Bidirectional communication can be performed between the second node 320 and the third node 330.
[0051] like Figure 3As shown, a first group of key-value pairs 311, 312, and 313 may be stored in a storage unit corresponding to zone 0 of a first node 310. A second group of key-value pairs 314 and 315 may be stored in a storage unit corresponding to zone 1 of the first node 310. A first group of key-value pairs 321, 322, and 323 may be stored in a storage unit corresponding to zone 0 of a second node 320. A second group of key-value pairs 324 and 325 may be stored in a storage unit corresponding to zone 1 of the second node 320. A first group of key-value pairs 311, 312, and 313 may be stored in a storage unit corresponding to zone 0 of a third node 330.
[0052] like Figure 3 As shown, first node 310 and node 320 can exchange key-value pair information through the connection between them, thereby achieving data synchronization. For example, first node 310 can send key-value pair 311 to node 320. After receiving key-value pair 311, node 320 can update key-value pair 321 based on key-value pair 311. Similarly, through the connection between first node 310 and node 330, first node 310 and node 330 can exchange key-value pair information. For example, first node 310 can send key-value pair 311 to node 330. After receiving key-value pair 311, node 330 can update key-value pair 331 based on key-value pair 311.
[0053] In some exemplary embodiments, the transmission of key-value pairs between multiple nodes is associated with the group to which the key-value pair is located (i.e., the zone to which the key-value pair belongs). Specifically, when data synchronization is performed between two nodes, only the key-value pair information common to the two nodes can be shared. That is, only the information of the key-value pairs used for data synchronization is shared. For a node, when the node sends key-value pair information to a peer node, it can be determined based on the information about the logical partition unit of the peer node that the key-value pairs are stored in the corresponding storage units of which zones of the peer node. In this case, the information about the zone of the peer node will be stored on the node before data synchronization.
[0054] In this way, key-value pairs can be grouped and stored in nodes. A node can then send only the key-value pairs needed for data synchronization to its peer nodes based on the key-value pair grouping. This reduces the amount of data required for data synchronization and improves data synchronization efficiency.
[0055] The following description will be made by taking the first node 310 executing the method for data synchronization according to the present disclosure as an example. First, the data item to be synchronized is determined at the first node 310. The data item to be synchronized includes a data value and metadata associated with the data value. The data item to be synchronized belongs to a first group of data items. The first group of data items is associated with at least one data transmission device in the data center network. In some exemplary implementations, the metadata includes information of an identifier associated with the data item to be synchronized. The identifier and the data item to be synchronized form a key-value pair, wherein the identifier corresponds to the key in the key-value pair, and the data item to be synchronized corresponds to the value in the key-value pair.
[0056] Specifically, the data item to be synchronized may be a key-value pair stored in first node 310, such as key-value pair 311. The at least one data transmission device associated with the first set of data items may be a data transmission device that also stores the first set of key-value pairs, such as second node 320 and third node 330. The data synchronization method according to an embodiment of the present disclosure will be described in detail below, using key-value pair 311 as an example of the data item to be synchronized.
[0057] In some exemplary embodiments, the metadata may include version information indicating the version of the data value. The metadata may also include generator information indicating the generator of the data value, validity time indicating the length of time the data value is valid, existence time indicating the length of time corresponding to the existence of the data value, data length indicating the data length of the data value and an identifier associated with the data value, an encrypted identifier, and / or the like.
[0058] In some exemplary embodiments, the data item to be synchronized may be, for example, a key-value pair. The key-value pair may include a key and a metavalue corresponding to the key. That is, a key and its corresponding metavalue constitute a key-value pair. Figure 4A and Figure 4B Examples of key-value pairs according to some embodiments of the present disclosure are described. Figure 4A A schematic diagram 400A shows a storage format of key-value pairs according to some embodiments of the present disclosure.
[0059] Figure 4A The memory cells corresponding to region 0 shown in FIG. 1 may be Figure 3 The storage unit corresponding to the zone in the first node 310, the second node 320 or the third node 330. Figure 3 In the first node 310, the second node 320 or the third node 330, the key-value pair can be Figure 4A The method shown in is stored.
[0060] like Figure 4AAs shown, in the storage unit corresponding to area 0, three key-value pairs belonging to the same group are stored, where key-value pair 410 includes key 411 (key 0) and metavalue 412 (metavalue 0). Metavalue 412 includes metadata (metadata 0) 414 and data value (value 0) 413.
[0061] exist Figure 4A In the example, key 411 can be stored in the form of a dynamic length string. Data value 413 can be stored in the form of a dynamic length binary array. In some exemplary embodiments, key-value pair 410 can be encoded and decoded using the MessagePack format. In this case, data value 413 and key 411 can be of arbitrary length. Messagepack is a binary serialization format that supports binary encoding of multiple data types (integers, floating-point numbers, strings, etc.). Messagepack can be used to transmit and store data between different systems or programming languages. Messagepack can be used for serialization (encoding) and deserialization (decoding) of data. For example, original data (including objects, dictionaries, arrays, etc.) is encoded with Messagepack to obtain binary data.
[0062] In this way, information of a set of key-value pairs can be efficiently stored in the logical partition unit, thereby improving the storage efficiency of data used for data synchronization.
[0063] Metadata may include one or more information items. For example, metadata 412 may include at least one information item associated with metadata (metadata 0) 414. Figure 4B An information item describing metadata according to some embodiments of the present disclosure. Figure 4B Metadata 400B according to some embodiments of the present disclosure is shown. Metadata 400B may be Figure 4A The metadata 414 in or other metadata in each key-value pair, for example, Figure 4A metadata 1 or metadata 2 in the .
[0064] like Figure 4B As shown, the metadata 400B may include multiple information items, such as the version number 451 of the key-value pair corresponding to the metadata 400B, the node identity 452 of the generator of the key-value pair, the validity time 453 of the key-value pair, the existence time 454 of the key-value pair, the data length 455 of the key-value pair and the hash value 456 of the key of the key-value pair.
[0065] exist Figure 4BIn the example, the version number 451 can be stored in the metadata 400B in the format of an unsigned 64-bit integer (unit64) to indicate the version of the data value. The node identity 452 of the generator can be stored in the metadata 400B as a dynamic length string to indicate the generator of the data value in the meta-value corresponding to the metadata 400B. The validity time 453 can be stored in the metadata 400B in the format of an integer (int type) to indicate the length of time the data value is valid. The existence time 454 can be stored in the metadata 400B in the format of an int type to indicate the length of time corresponding to the existence period of the data value. The data length 455 can be stored in the metadata 400B in the format of an int type to indicate the total data length of the data value and the key. The hash value 456 of the key can be stored in the metadata 400B as an unsigned 64-bit integer. In some exemplary embodiments, the key can also be encrypted using other algorithms. That is, the metadata 400B can also store encrypted keys in other forms.
[0066] It should be understood that the examples of information items in the metadata described in this disclosure are for illustrative purposes only and are not intended to limit the embodiments of the present disclosure. The metadata of the embodiments of the present disclosure may include any suitable number of information items, and the embodiments of the present disclosure do not impose any limitation on this.
[0067] In this way, information about key-value pairs can be efficiently stored in metadata, thereby improving the storage efficiency of data used for data synchronization.
[0068] Continue back Figure 3 , the first node 310 may determine, based on a data transmission rule for the data center network, transmission information about the data item to be synchronized with respect to the at least one data transmission device. Specifically, the transmission information may be used to indicate whether to send the data item to be synchronized, or a target data transmission device for receiving the data item to be synchronized. For example, the first node 310 may determine, based on the data transmission rule, whether to send the data item to be synchronized, or determine a target data transmission device, such as the second node 320 or the third node 330. In some exemplary implementations, the data transmission rule is predetermined or stored in the first node 310.
[0069] In some exemplary embodiments, determining the data items to be synchronized may include generating the data items to be synchronized and / or receiving candidate data items. For example, the first node 310 may generate the data values and metadata associated with the data values included in the data items to be synchronized (i.e., key-value pairs 311). Alternatively, the first node 310 may receive the candidate data items from other nodes (e.g., the second node 320 or the third node 330).
[0070] In the example where the first node 310 generates a data item to be synchronized, since the first node 310 is the generator of the data, the metadata may include information indicating the generator of the first node 310, such as a node identifier of the first node 310. The key-value pair 311 may be synchronized to other nodes for data synchronization.
[0071] It should be understood that the examples of generating data items to be synchronized described in this disclosure are for illustrative purposes only and are not intended to limit the embodiments of this disclosure in any way. In some exemplary embodiments, generating data items to be synchronized may include updating the data values and metadata associated with the data values included in existing key-value pairs. The embodiments of this disclosure do not impose any limitations on this.
[0072] In some exemplary embodiments, for each set of key-value pairs in a node, the node may store information about the node's peer nodes. For example, for the first set of key-value pairs in a node, the node may store information about the nodes associated with the first set of key-value pairs among the node's peer nodes. In some exemplary implementations, a storage unit corresponding to each region of the node may store a peer node dictionary, and the peer node dictionary may store information about the node's peer nodes grouped according to the key-value pairs, such as node identifiers.
[0073] For example, for Figure 3 For the first node 310 in the example, a peer node dictionary may be stored in the storage unit corresponding to zone 0 associated with the first set of key-value pairs. The peer node dictionary may include the node identifiers of the second node 320 and the third node 330, which also store the first set of key-value pairs. The peer node dictionary may be implemented as a key-value pair, where the key is the identifier of the node's peer node corresponding to the key-value pair group, and the value is empty. Based on the peer node dictionary, the node can quickly traverse all peer nodes corresponding to a set of key-value pairs. Therefore, data synchronization efficiency can be improved.
[0074] After generating the data value and metadata, first node 310 may store the to-be-synchronized data item in a first set of data items at first node 310 for synchronization with at least one data transmission device. For example, key-value pair 311 may be stored in a storage unit corresponding to zone 0 corresponding to the first set of data items. In this case, first node 310 may determine transmission information for key-value pair 311 regarding at least one data transmission device based on data transmission rules for the data center network.
[0075] Data transmission rules may include rules for controlling the transmission of data items to other data transmission devices, also known as output rules, and may also include rules for receiving data items from other data transmission devices, also known as input rules. Furthermore, data transmission rules may include other rules for controlling the transmission of data items, and the embodiments of the present disclosure are not limited thereto.
[0076] Output rules can control the transmission of data items to other data transmission devices based on a list of data transmission devices allowed for data synchronization, message categories allowed for data synchronization, or groups of data items allowed for synchronization. These output rules can be preset, predefined, or preconfigured in the node data transmission device. The embodiments of the present disclosure are not limited in this regard.
[0077] Specifically, the first node 310 may determine a list of data transmission devices permitted for data synchronization based on the data transmission rules. For example, the data transmission rules may be used to determine the list of data transmission devices. Next, the first node 310 may determine a data transmission device from the at least one data transmission device that is included in the list of data transmission devices as the target data transmission device.
[0078] For example, in Figure 3 In the example, the at least one data transmission device may include a second node 320 and a third node 330. If the data transmission device list includes the second node 320, the first node 310 may determine the second node 320 as the target transmission device. The following description will use the second node 320 as the target transmission device as an example.
[0079] In some exemplary embodiments, if the data transmission device in the data transmission device list does not exist in the at least one data transmission device, the first node 310 may determine that the transmission message indicates not to send the to-be-synchronized data item. In other words, the first node 310 may not synchronize the key-value pair 311 with other nodes in the data center network.
[0080] After determining the target transmission device, the first node 310 may send the data item to be synchronized to the target data transmission device. For example, the first node 310 may send a key-value pair 311 to the second node 320.
[0081] Alternatively or additionally, the first node 310 may determine the message category that is allowed to perform data synchronization based on the data transmission rule. For example, the data transmission rule may be used to determine one or more message categories that are allowed to perform data synchronization. Next, the first node 310 may determine whether the message associated with the generated data item to be synchronized belongs to the message category that is allowed to perform data synchronization. If the message associated with the generated data item to be synchronized belongs to the message category that is allowed to perform data synchronization, the first node 310 may send the data item to be synchronized to the target data transmission device. If the message associated with the generated data item to be synchronized does not belong to the message category that is allowed to perform data synchronization, the first node 310 may determine that the transmission message indicates that the data item to be synchronized is not to be sent. In addition, the following will be combined with Figure 5 and Figure 6 Messages associated with generated data items to be synchronized according to some embodiments of the present disclosure are described in detail.
[0082] In some exemplary embodiments, the first node 310 may determine a group of data items that are allowed to be synchronized based on a data transmission rule. The data transmission rule may be used to determine one or more groups of data items that are allowed to be synchronized. For example, the data transmission rule may be used to determine whether a first group of data items is allowed (or prohibited) for data synchronization. The first node 310 may then determine whether the first group of data items belongs to a group of data items that are allowed to be synchronized. If the first node 310 determines that the first group of data items belongs to a group of data items that are allowed to be synchronized, the first node 310 may send the data items to be synchronized to the target data transmission device. If it is determined that the first group of data items does not belong to a group of data items that are allowed to be synchronized, the first node 310 may determine that a transmission message indicates that the data items to be synchronized are not to be sent.
[0083] For example, if the first node 310 generates key-value pair 311 and key-value pair 314 as data items to be synchronized, and if the first node 310 determines that the first group of data items belongs to the data item group allowed to be synchronized, and the second group of data items does not belong to the data item group allowed to be synchronized, then the first node 310 may send key-value pair 311 to the second node 320 instead of sending key-value pair 314.
[0084] As described above, in addition to generating / updating the data items to be synchronized by the first node 310, the first node 310 may also receive data items. The data items accepted by the first node 310 may be referred to as candidate data items. The data items to be synchronized may be determined based on the candidate data items. In some exemplary embodiments, the first node 310 may receive the candidate data items from at least one data transmission device associated with the first set of data items. Figure 3 In the example shown, the first node 310 may receive a key-value pair 321 from the second node 320. In this case, the key-value pair 321 is a candidate data item.
[0085] The data synchronization method according to the embodiment of the present disclosure will be described below using the key-value pair 321 as an example of a candidate data item.
[0086] Next, the first node 310 may determine the data items to be synchronized based on the candidate data items. Specifically, the first node 310 may determine the data items to be synchronized based on input rules. The input rules may control the reception of data items from other data transmission devices based on a list of data transmission devices allowed for data synchronization, message categories allowed for data synchronization, or data item groupings allowed for data synchronization. The input rules may be preset, predefined, or preconfigured in the node data transmission device. The embodiments of the present disclosure are not limited thereto.
[0087] For example, the first node 310 may determine whether to use the candidate data item for data synchronization. In some exemplary implementations, the first node 310 may determine the candidate data item as a data item to be synchronized. Alternatively, if the candidate data item is determined by the first node 310 not to be a data item to be synchronized, the first node 310 may discard the candidate data item.
[0088] Alternatively, the first node 310 may determine whether the at least one data transmission device that sent the candidate data item belongs to a list of data transmission devices permitted for data synchronization. If the at least one data transmission device belongs to the list of data transmission devices permitted for data synchronization, the first node 310 may determine the candidate data item as a data item to be synchronized. For example, if the second node 320 belongs to the data transmission list, the first node 310 may determine the key-value pair 321 sent by the second node 320 as a data item to be synchronized.
[0089] In other alternatives, the first node 310 may determine whether the message associated with the candidate data item (e.g., the message used to send the candidate data item) belongs to a message category that allows data synchronization. If the message associated with the candidate data item belongs to a message category that allows data synchronization, the first node 310 may determine the candidate data item as a data item to be synchronized. For example, if the message used by the second node 320 to send the key-value pair 321 belongs to a message category that allows data synchronization, the first node 310 may determine the key-value pair 321 as a data item to be synchronized.
[0090] In a further alternative, the first node 310 may determine whether the first group of data items belongs to a group of data items that are allowed to be synchronized. If the first group of data items belongs to a group of data items that are allowed to be synchronized, the first node 310 may determine the candidate data items as data items to be synchronized. For example, if the first group of key-value pairs (e.g., corresponding to zone 0) belongs to a group of key-value pairs that are allowed to be synchronized, the first node 310 may determine the key-value pair 321 as a data item to be synchronized.
[0091] After determining the data item to be synchronized, the first node 310 may also determine whether to perform a data synchronization operation on the data item to be synchronized based on the metadata in the data item to be synchronized. For example, if the first node 310 determines that the key-value pair 321 is a newer version of the key-value pair relative to the key-value pair 311 based on the version information in the metadata in the key-value pair 321, the first node 310 may determine to perform a data synchronization operation on the key-value pair 321. In some exemplary embodiments, the data synchronization operation may include updating or storing the data item to be synchronized. If it is determined to perform a data synchronization operation, the first node 310 may store the data item to be synchronized in a first group of data items at the first node 310 for synchronization to a target data transmission device. For example, the first node 310 may store the key-value pair 321 in the first group of key-value pairs. In this case, the first node 310 may synchronize the key-value pair 321 to other data transmission devices associated with the first group of key-value pairs in the data center network.
[0092] In this case, if it is determined to perform a data synchronization operation, the first node 310 may store the to-be-synchronized data items in the first group of data items at the first data transmission device. In some exemplary embodiments, if the first node 310 does not include a key-value pair corresponding to the key-value pair 321, the first node 310 may store the key-value pair 321 in the first group of key-value pairs. For example, if the first node 310 does not include a key-value pair having the same key (Key 0) as the key-value pair 321, the first node 310 may store the key-value pair in the first group of key-value pairs.
[0093] Alternatively, if it is determined to perform a data synchronization operation, the first node 310 may update the corresponding data item in the first set of data items at the first data transmission device using the data item to be synchronized. In some exemplary implementations, if the first node 310 includes a key-value pair corresponding to the key-value pair 321, for example, the key-value pair 311 having the same key (Key 0), the first node 310 may update the key-value pair 311 using the key-value pair 321. Specifically, the first node 310 may update the data value in the key-value pair 311 with the data value (value 0) in the key-value pair 321. In this case, after the update, the first set of key-value pairs stored in the first node 310 may include the key-value pairs 311, 312, and 313, and the data value in the key-value pair 311 may be equal to the data value in the key-value pair 321.
[0094] Next, first node 310 may determine transmission information about at least one data transmission device from key-value pair 321. For example, first node 310 may determine the transmission information based on the output rule described above. Specifically, first node 310 may determine the transmission information based on a list of data transmission devices permitted for data synchronization, message categories permitted for data synchronization, or groups of data items permitted for synchronization.
[0095] In some exemplary embodiments, the first node 310 may determine a list of data transmission devices permitted for data synchronization based on data transmission rules. For example, the data transmission rules may be used to determine the list of data transmission devices. Next, the first node 310 may determine, from among at least one data transmission device, a data transmission device that is included in the list of data transmission devices as a target data transmission device.
[0096] For example, in Figure 3 In the example, the at least one data transmission device may include a second node 320 and a third node 330. If the data transmission device list includes the third node 330, the first node 310 may determine the third node 330 as the target transmission device. The following description will use the third node 330 as the target transmission device as an example.
[0097] In some exemplary embodiments, if the data transmission device in the data transmission device list does not exist in the at least one data transmission device, the first node 310 may determine that the transmission message indicates not to send the to-be-synchronized data item. In other words, the first node 310 may not synchronize the key-value pair 321 with other nodes in the data center network.
[0098] After determining the target transmission device, the first node 310 may send the data item to be synchronized to the target data transmission device. For example, the first node 310 may send a key-value pair 311 to the second node 320.
[0099] Alternatively or additionally, the first node 310 may determine a message category that is allowed to perform data synchronization based on a data transmission rule. For example, a data transmission rule may be used to determine one or more message categories that are allowed to perform data synchronization. Next, the first node 310 may determine whether the message associated with the generated data item to be synchronized (e.g., a message for sending the candidate data item) belongs to a message category that is allowed to perform data synchronization. If the message associated with the generated data item to be synchronized belongs to a message category that is allowed to perform data synchronization, the first node 310 may send the data item to be synchronized to the target data transmission device. If the message associated with the generated data item to be synchronized does not belong to a message category that is allowed to perform data synchronization, the first node 310 may determine that the transmission message indicates that the data item to be synchronized is not to be sent.
[0100] In other alternatives, the first node 310 may determine the data item groups that are allowed to be synchronized based on the data transmission rules. The data transmission rules may be used to determine one or more data item groups that are allowed to be synchronized. For example, the data transmission rules may indicate that the first group of data can (or cannot) be used for data synchronization. The first node 310 may then determine whether the first group of data items belongs to the data item group that is allowed to be synchronized. If the first node 310 determines that the first group of data items belongs to the data item group that is allowed to be synchronized, the first node 310 may send the data items to be synchronized to the target data transmission device. If it is determined that the first group of data items does not belong to the data item group that is allowed to be synchronized, the first node 310 may determine that the transmission message indicates that the data item to be synchronized is not to be sent.
[0101] In a further alternative, the first node 310 may determine whether the target data transmission device is the generator of the data item to be synchronized based on an information item in the metadata indicating the generator of the data item to be synchronized. For example, the first node 310 may determine that the generator of the key-value pair 321 is the second node 320 based on a node indicator indicating the generator (i.e., the second node 320) in the metadata of the key-value pair 321. If the target transmission device is not the generator of the data item to be synchronized, the first node 310 may send the data item to be synchronized to the target data transmission device. For example, if the target transmission device is the third node 330, not the second node 320, the first node 310 may send the key-value pair 321 to the third node 330. If the target transmission device is the second node 320, the first node 310 may not send the data item to be synchronized.
[0102] In this way, data synchronization for grouped key-value pairs can be performed flexibly and effectively between peer nodes in a data center network, thereby improving the data synchronization efficiency of data transmission devices.
[0103] The following will be combined Figures 5 to 8A communication process for data synchronization between nodes according to some embodiments of the present disclosure is described.
[0104] In some exemplary embodiments, the transport layer between nodes can communicate based on the Transmission Control Protocol (TCP). Specifically, a persistent TCP connection can be established between each pair of peer nodes. When the TCP connection is disconnected, the nodes can automatically reconnect. Additionally, the connection between each pair of peer nodes can be maintained using a TCP keep-alive mechanism.
[0105] Specifically, if a node detects a TCP disconnect after a preset time (e.g., 30 seconds), it can attempt to reconnect. If the reconnection fails, the next reconnection interval can be set to N times the preset time (N is the number of reconnection attempts). When the number of reconnections exceeds a predetermined threshold (e.g., 6), N no longer increases with the number of reconnections. That is, the maximum reconnection interval can be 180 seconds.
[0106] Furthermore, messages according to some embodiments of the present invention may be serialized and / or deserialized based on Messagepack.
[0107] Figure 5 Schematic diagram showing communication messages 500 between nodes according to some embodiments of the present disclosure. Figure 5 As shown, the communication message 500 may include a message header 501. The message header 501 may include a data link layer (Layer 2) message header, such as an Ethernet message header, a network layer (Layer 3) message header, such as an Internet Protocol (IP) message header, and a TCP message header. After the TCP message header, the communication message 500 may also include a payload 502. In some exemplary embodiments, the payload 502 may include data encoded and decoded by Messagepack, such as communication information encoded and decoded by Messagepack, that is, a message 503. Specifically, the message 503 may include an inner message header 504 and one or more frames, such as frame 0, frame 1, frame 2, etc. The frame size in the message 503 may be fixed, and the frame size may be stored in the inner message header 504. Figure 5In the example of FIG, inner message header 504 may occupy 24 bytes. Message 503 may include various types of messages, such as an open message, a keepalive message, an area descriptor message, an update message, a request message, and / or the like. Information about the message type may be indicated in inner message header 504.
[0108] Figure 5 The inner message header 504 can be implemented in many ways. For example, Figure 6 FIG. 6 is a schematic diagram showing an inner message header 600 according to some embodiments of the present disclosure. Figure 6 As shown, the inner message header 600 may include a magic identifier 601, a message type 602, a frame count 603, and a frame size 604. The magic identifier 601 may be used for message identification and verification. Specifically, the magic identifier 601 may include a custom value, such as a magic number. Figure 6 In the example shown in FIG, inner message header 600 may occupy 24 bytes, of which magic identifier 601 may occupy 8 bytes, message type 602 may occupy 1 byte, frame count 603 may occupy 1 byte, and frame size 604 may occupy 14 bytes. Frame size 604 may indicate the storage space occupied by a frame, for example, the number of bytes. Additionally, the number of frames in a message corresponding to each message type 602 may be fixed.
[0109] Continue back Figure 5 In some exemplary embodiments, if message 503 is an open message, message type 602 may be type 0. An open message is used to establish an initial connection and exchange basic parameters. An open message may include only one frame. The frame may include a node identifier for identifying the source node sending the open message. The node identifier may be in the format of a dynamic length string. The frame may also include protocol version information for protocol version checking and compatibility verification. The protocol version information may be stored as an int type.
[0110] If message 503 is a keep-alive message, message type 602 may be type 1. Keep-alive information may be used to maintain application layer connections and detect data consistency in storage units. Specifically, a hash value may be calculated for a set of key-value pairs stored in a storage unit corresponding to each zone in each node as a zone signature. The zone signature may be sent in a keep-alive message. After receiving the keep-alive message, the node may compare the received zone signature with its own zone signature to determine whether they are consistent. Based on the result of the determination, the node may determine whether data synchronization is required. For example, if the determination is inconsistent, the node may perform data synchronization. If the determination is consistent, the node may not perform data synchronization.
[0111] The keep-alive message may include only one frame. Specifically, the frame may include a dictionary indexed by the zone name for storing the zone signature of each zone. The zone name may be a dynamic length string. The zone signature of each zone is independent. The frame may also include information indicating the calculation method for determining the zone signature. For example, a hash value for the state of the storage unit corresponding to the zone can be determined based on each key and protocol version information in the storage unit corresponding to the zone. The calculation method can be any fast, low-collision algorithm, such as secure hash algorithm (SHA)-256 or cyclic redundancy check (CRC) 64.
[0112] If message 503 is a zone descriptor message, message type 602 may be type 2. The zone descriptor message may include two frames. One of the two frames may include zone identity information to indicate a zone; the other frame may include each key in the storage unit corresponding to the zone and the metadata corresponding to the key, that is, the other frame may include the key and metadata in each key-value pair in a set of key-value pairs corresponding to the zone. For example, one frame in the zone descriptor message may include the name of a single zone and the zone signature of the zone. The other frame may include a dictionary indexed by the key in the storage unit corresponding to the frame. The dictionary may include metadata for each key in the storage unit. The zone descriptor message may be used to describe in detail the data status of the storage unit of the zone in the node, so that the receiving end of the message can detect whether it is consistent.
[0113] If message 503 is an update message, message type 602 may be type 3. Update messages may be used to synchronize inconsistent data between nodes. The update message may include specific information about the key-value pairs that need to be updated. By parsing the update message, the node may merge the update information of the sender of the message into the corresponding storage unit in the node to achieve consistency between the node and the sender of the message. The update message may include two frames. One of the two frames may include zone identity information and the zone signature corresponding to the zone. The other frame may include each key and the metadata corresponding to the key in the storage unit corresponding to the zone, that is, the key and metadata in each key-value pair in a set of key-value pairs corresponding to the zone.
[0114] If message 503 is a request message, message type 602 may be Type 4. Request messages can be used to request specific data, such as metadata, between nodes. A node can send a request message to request data updates for a specified zone or key from another node for data synchronization.
[0115] The request message may include two frames, one of which may include the zone name and the zone signature of the storage unit corresponding to the zone on the node. The other frame may include a dictionary indexed by the keys in the storage unit. The dictionary may include version information for each key being requested.
[0116] It should be understood that the examples of messages described in this disclosure are for illustrative purposes only and are not intended to limit the embodiments of the present disclosure in any way. The messages in the embodiments of the present disclosure may include any suitable number and / or messages having any suitable structure, and the embodiments of the present disclosure do not impose any restrictions on this.
[0117] In this way, messages used for key-value data synchronization can be flexibly and efficiently stored and transmitted. Nodes can synchronize inconsistent key-value pairs based on messages, improving the efficiency and effectiveness of data synchronization.
[0118] The following will be combined Figure 7 and Figure 8 A data synchronization process according to some embodiments of the present disclosure is described. Figure 7 FIG. 7 is a flow chart of a method 700 for data synchronization according to some embodiments of the present disclosure. It should be understood that the method 700 may be performed by, for example Figure 1 The data transmission device 110, the data transmission device 120, the data transmission device 130, the data transmission device 140 or other appropriate devices are executed. The following description will take the data transmission device 110 executing the method 700 as an example.
[0119] At 710, data transmission device 110 determines, at data transmission device 110 in a data center network, a data item to be synchronized. The data item to be synchronized includes a data value and metadata associated with the data value. The data item to be synchronized belongs to a first group of data items, which is associated with at least one data transmission device in the data center network. At 720, based on data transmission rules for the data center network, data transmission device 110 determines transmission information of the data item to be synchronized with respect to the at least one data transmission device.
[0120] In some exemplary embodiments, the transmission information may be used to indicate whether to send the data item to be synchronized, or a target data transmission device for receiving the data item to be synchronized.
[0121] In some exemplary embodiments, data transmission device 110 may generate data values and metadata associated with the data values for the data items to be synchronized. Data transmission device 110 may then store the data items to be synchronized in a first set of data items at data transmission device 110 for synchronization to at least one data transmission device.
[0122] In some exemplary embodiments, data transmission device 110 may determine a list of data transmission devices permitted for data synchronization based on data transmission rules. Data transmission device 110 may then determine, from among at least one data transmission device, a data transmission device in the list as a target data transmission device. Data transmission device 110 may then send the data item to be synchronized to the target data transmission device.
[0123] In some exemplary embodiments, the data transmission device 110 may determine a message category that is permitted for data synchronization based on the data transmission rule. Then, in response to determining that the message associated with the generated data item to be synchronized belongs to the message category that is permitted for data synchronization, the data transmission device 110 may send the data item to be synchronized to the target data transmission device.
[0124] In some exemplary embodiments, the data transmission device 110 may determine a group of data items allowed to be synchronized based on the data transmission rule. Then, in response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the data transmission device 110 may send the data items to be synchronized to the target data transmission device.
[0125] In some exemplary embodiments, the data transmission device 110 may receive candidate data items from at least one data transmission device associated with the first group of data items, and then the data transmission device 110 may determine the data items to be synchronized based on the candidate data items.
[0126] In some exemplary embodiments, data transmission device 110 may determine a candidate data item as a data item to be synchronized. Alternatively, data transmission device 110 may determine a candidate data item as a data item to be synchronized in response to determining that at least one data transmission device belongs to a list of data transmission devices permitted for data synchronization. Data transmission device 110 may determine a candidate data item as a data item to be synchronized in response to determining that a message associated with the candidate data item belongs to a message category permitted for data synchronization. Data transmission device 110 may determine a candidate data item as a data item to be synchronized in response to determining that the first group of data items belongs to a group of data items permitted for synchronization.
[0127] In some exemplary embodiments, the data transmission device 110 may further determine whether to perform a data synchronization operation on the data to be synchronized based on metadata in the data to be synchronized. In response to determining to perform the data synchronization operation, the data transmission device 110 may further store the data item to be synchronized in the first group of data items at the first data transmission device for synchronization with the target data transmission device.
[0128] In some exemplary embodiments, the data transmission device 110 may further, in response to determining to perform a data synchronization operation, store the data item to be synchronized in the first set of data items at the first data transmission device. Alternatively, the data transmission device 110 may further, in response to determining to perform a data synchronization operation, update a corresponding data item in the first set of data items at the first data transmission device using the data item to be synchronized.
[0129] In some exemplary embodiments, data transmission device 110 may determine a list of data transmission devices permitted for data synchronization based on the data transmission rules. Data transmission device 110 may then determine a data transmission device associated with the first set of data items from the list of data transmission devices as a target data transmission device. Data transmission device 110 may then send the data items to be synchronized to the target data transmission device.
[0130] In some exemplary embodiments, the data transmission device 110 may determine a message category that is allowed for data synchronization based on the data transmission rule. Then, in response to determining that the message associated with the data item to be synchronized belongs to the message category that is allowed for data synchronization, the data transmission device 110 may send the data item to be synchronized to the target data transmission device.
[0131] In some exemplary embodiments, data transmission device 110 may determine a group of data items allowed to be synchronized based on the data transmission rule. In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, data transmission device 110 may send the data items to be synchronized to the target data transmission device.
[0132] In some exemplary embodiments, data transmission device 110 may determine whether the target data transmission device is the generator of the data to be synchronized based on an information item in the metadata indicating the generator of the data to be synchronized. In response to determining that the target data transmission device is not the generator of the data to be synchronized, data transmission device 110 may send the data item to be synchronized to the target data transmission device.
[0133] In some exemplary embodiments, the metadata may include version information indicating the version of the data value, generator information indicating the generator of the data value, validity time indicating the length of time the data value is valid, existence time indicating the length of time corresponding to the existence period of the data value, data length indicating the data length of the data value and an identifier associated with the data value, and an encrypted identifier.
[0134] In some exemplary embodiments, the metadata may include information of an identifier associated with the data item to be synchronized, wherein the identifier and the data item to be synchronized form a key-value pair, wherein the identifier corresponds to the key in the key-value pair and the data item to be synchronized corresponds to the value in the key-value pair.
[0135] Figure 7 The method for data synchronization in can be implemented in many ways. For example, Figure 8 800 according to some embodiments of the present disclosure. The state machine 800 may be executed by nodes in a data center network for data synchronization, for example, Figure 3 3. The first node 310, the second node 320, or the third node 330 shown in FIG. Specifically, at 801, the node may initiate a state machine. For example, based on configured peer node information, the node may establish a TCP connection between the node and the peer node on the control plane. Next, at 802, the node may determine whether the TCP connection has been established. If the TCP connection is not established or is disconnected, the node returns to 801.
[0136] If the TCP connection has been established, the node exchanges open messages with the peer node to which the TCP connection has been established in 803. Specifically, the node can send an open message to the peer node, and the peer node can also send an open message to the node. The open message may include the node identifier and protocol version information of the node. In 804, the node can determine whether it has received the open message from the peer node. If the open message is not received, the node can return to 803. If the node receives the open message from the peer node, the node can enter 805 and exchange keep-alive messages with the peer node. After exchanging keep-alive messages, in 806, the node can determine whether it has received the keep-alive message from the peer node. If the keep-alive message is not received, the node can return to 805. If the keep-alive message is received, the node can confirm in 807 whether the zone signature in the keep-alive message is mismatched or inconsistent.
[0137] Specifically, the node can determine whether the content in the storage unit corresponding to any zone needs to be updated, that is, whether any key-value pairs need to be updated, based on the zone signatures of all zones of the peer node received in the keep-alive message. If no zone needs to be updated, the node can proceed to 813. At 813, the node can enter the connection-completed state. If it is determined that the zone signatures mismatch or are inconsistent, the node can proceed to 808.
[0138] At 808, the node may exchange zone descriptors with the peer node, for example, the node and the peer node may send zone descriptor messages to each other. The node may then confirm at 809 whether it has received the zone descriptor from the peer node. If the zone descriptor is not received, the node may confirm at 807 whether the zone signature in the keep-alive message is mismatched or inconsistent. If the node receives the zone descriptor sent by the peer node, the node may determine at 810 whether the key-value pairs stored in the node need to be updated based on the zone descriptor of the peer node. Specifically, if the node determines at 808 that the zone signatures of the node and the peer node regarding one or more zones are mismatched or inconsistent, the node may send the zone descriptor for the zone at 808. The zone descriptor may include metadata for each key-value pair in a set of key-value pairs corresponding to the zone. For example, the node may check the version information in the metadata of the key-value pair to determine whether the key-value pair is newer than the key-value pair stored by the node. If a zone descriptor is received from a peer node, the node can determine based on the zone descriptor whether the key-value pairs in a set of key values corresponding to the zone in the node need to be updated relative to the key-value pairs in the peer node, that is, whether the key-value pairs stored in the node are new or old.
[0139] If the node determines that the key-value pairs stored within the node do not need to be updated, the node may proceed to 813. At 813, the node may enter the connection-completed state. If it is determined that the key-value pairs stored within the node need to be updated, the node may proceed to 811. At 811, the node may send a request message to the peer node to request the peer node for information corresponding to the key-value pairs that need to be updated. Next, the node may determine at 812 whether an update message has been received. If the update message has not been received from the peer node, the node may return to 811. If the node receives the update message, the node may complete data synchronization based on the update message.
[0140] The node may then proceed to 813. Next, the node may periodically exchange keep-alive messages with its peer nodes to ensure data consistency between the node and the peer nodes. Specifically, the node may determine at 814 whether it has received a keep-alive message from the peer node. If the keep-alive message has been received, the node may continue to determine at 807 whether there is data that needs to be updated. If the keep-alive message has not been received, the node may return to 813 and wait for the next keep-alive message to be sent to the peer node.
[0141] In this way, a node can flexibly and efficiently maintain data consistency with its peer nodes by executing state machine 800. The data propagation speed during data synchronization is increased. Furthermore, during data synchronization between multiple nodes, only the data that needs to be updated is transmitted, improving the efficiency and effectiveness of data synchronization.
[0142] In some exemplary embodiments, before adding or updating a key-value pair, a node may first determine whether it is the generator of the key-value pair. When a node is the generator of a key-value pair, the node may actively update or add the key-value pair to a set of key-value pairs. When generating and sending an update message, the node may generate an update message, which may include two frames. One of the frames may include a zone signature, and the other frame may include a meta-value that has been changed. The meta-value that has been changed may include metadata and data values of the key-value pair. After generating the update message, the node may send the update message to all peer nodes included in the peer node dictionary associated with the zone corresponding to the updated key-value pair.
[0143] Next, after receiving the update message, the peer node can check the metadata of each key-value pair. If the peer node determines that the received key-value pair is a new version by comparing it with the locally stored key-value pair, the peer node can update the locally stored key-value pair based on the received key-value pair.
[0144] During data update propagation, if a node receives an update message from peer node A, the node may check the peer node dictionary for the zone corresponding to the key-value pair in the update message to determine whether other peer nodes are also associated with the same set of key-value pairs. If it is determined that peer node B is also associated with this set of key-value pairs, the node may check the producer of the key-value pairs in each update message. If peer node B is not the producer, and the key value received by the node from peer node A is newer than the key-value pair stored by peer node B, the node may send the update message to peer node B.
[0145] In some exemplary embodiments, each key-value pair can be updated only by the generator of that key-value pair. After the generator updates the key-value pair, it can synchronize the updated key-value pair to other nodes, but other nodes will not transmit the key-value pair information back to the generator. Additionally, a node can only propagate key-value pair versions that are newer than the key-value pair it stores, which can avoid the occurrence of update message loops that can cause livelock.
[0146] Furthermore, to reduce network bandwidth overhead, a key-value pair can be deleted by aging it out. For example, a node can periodically iterate over all key-value pairs and increment the lifetime of the key-value pair's metadata by one. When the lifetime of a key-value pair exceeds its validity period or reaches 0, the key-value pair is deleted from the node.
[0147] When a node needs to delete a key-value pair, it can set the validity period in the metadata of the key-value pair to 0. In this case, the node can delete the key-value pair when it regularly traverses to the key-value pair. In some exemplary embodiments, the node may not send a message to other nodes after deleting the key-value pair. Other nodes can delete the key-value pair in the future based on the validity period. The key-value pair can gradually disappear from all nodes, which does not generate additional network messages.
[0148] In some exemplary implementations, when the existence time of a key-value pair is greater than or equal to the validity time minus a predetermined value (e.g., 2), the key-value pair may enter a dying state. Updates to a key-value pair in a dying state may not be sent to other nodes.
[0149] If a node determines, based on a keepalive message, that the zone signature for a zone on a peer node is inconsistent with the zone signature for the zone in its local storage, the node may synchronize data. Specifically, based on the keepalive message, the node and the peer node may both determine that their zone signatures are different. In this case, the node and the peer node may send each other the zone descriptor for the zone.
[0150] After receiving a zone descriptor from a peer node, the node can traverse all key-value pairs in the zone and compare the version information of the local key-value pairs with the key-value pairs corresponding to the received zone descriptor. Next, the node can record the key-value pairs whose local version information lags behind the peer node's version information in a request message and send the request message to the peer node. After receiving the update message sent by the peer node, the node can update the local storage unit based on the update message. The node can then send the update message to other peer nodes.
[0151] Furthermore, based on the aforementioned output rules, message transmission can be controlled. Specifically, when a node sends a message, it can determine whether to send the message based on the output rules. If it determines not to send the message, the node can discard the message. For example, the node can determine whether to send the message based on the node identifier of the message's source node. The node can determine whether to send the message based on the message type, for example, only sending zone descriptor messages, update messages, request messages, etc. The node can determine whether to send the message based on the zone name, for example, only sending messages corresponding to the zone associated with the first set of key-value pairs.
[0152] Message transmission can also be controlled based on input rules. Specifically, when a node receives a message, it can determine whether to accept the message based on its output rules. If it determines not to accept the message, the node can discard the message. For example, the node can determine whether to accept the message based on the node identifier of the message's source node. The node can determine whether to accept the message based on the message type, for example, only accepting zone descriptor messages, update messages, request messages, etc. The node can determine whether to accept the message based on the zone name, for example, only accepting messages corresponding to the zone associated with the first set of key-value pairs.
[0153] In some exemplary embodiments, input rules and output rules are configured at the zone level in a node. That is, different zones in the same node may have different input rules and / or output rules.
[0154] In this way, message transmission between different nodes in a data center network can be flexibly controlled, improving the speed and accuracy of data synchronization.
[0155] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 9 1 shows a schematic structural block diagram of an apparatus 900 for data synchronization according to certain embodiments of the present disclosure. Apparatus 900 may be implemented as or included in data transmission device 110, data transmission device 120, data transmission device 130, or data transmission device 140. Each module / component in apparatus 900 may be implemented by hardware, software, firmware, or any combination thereof.
[0156] like Figure 9 As shown, the apparatus 900 includes: a data item determination module 910, configured to determine a data item to be synchronized at a first data transmission device in a data center network, the data item to be synchronized including a data value and metadata associated with the data value, the data item to be synchronized belongs to a first group of data items, and the first group of data items is associated with at least one data transmission device in the data center network; a transmission information determination module 920, configured to determine transmission information of the data item to be synchronized regarding at least one data transmission device based on a data transmission rule for the data center network.
[0157] In some exemplary embodiments, the transmission information may be used to indicate whether to send the data item to be synchronized, or a target data transmission device for receiving the data item to be synchronized.
[0158] In some exemplary embodiments, the data item determination module 910 may generate data values and metadata associated with the data values included in the data items to be synchronized. The data item determination module 910 may store the data items to be synchronized in a first set of data items at the first data transmission device for synchronization to at least one data transmission device.
[0159] In some exemplary embodiments, the transmission information determination module 920 may determine a list of data transmission devices permitted for data synchronization based on the data transmission rules. The transmission information determination module 920 may determine, from the at least one data transmission device, a data transmission device in the data transmission device list as a target data transmission device. The transmission information determination module 920 may send the data item to be synchronized to the target data transmission device.
[0160] In some exemplary embodiments, the transmission information determination module 920 may determine a message category that is permitted for data synchronization based on a data transmission rule. In response to determining that the message associated with the generated data item to be synchronized belongs to a message category that is permitted for data synchronization, the transmission information determination module 920 may send the data item to be synchronized to the target data transmission device.
[0161] In some exemplary embodiments, the transmission information determination module 920 may determine a group of data items allowed to be synchronized based on the data transmission rule. In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the transmission information determination module 920 may send the data items to be synchronized to the target data transmission device.
[0162] In some exemplary embodiments, the data item determination module 910 may receive candidate data items from at least one data transmission device associated with the first group of data items. The data item determination module 910 may determine the data items to be synchronized based on the candidate data items.
[0163] In some exemplary embodiments, the data item determination module 910 may determine a candidate data item as a data item to be synchronized. The data item determination module 910 may determine the candidate data item as a data item to be synchronized in response to determining that at least one data transmission device belongs to a list of data transmission devices permitted for data synchronization. The data item determination module 910 may determine the candidate data item as a data item to be synchronized in response to determining that a message associated with the candidate data item belongs to a message category permitted for data synchronization. The data item determination module 910 may determine the candidate data item as a data item to be synchronized in response to determining that the first group of data items belongs to a group of data items permitted for synchronization.
[0164] In some exemplary embodiments, the apparatus 900 may further include a data synchronization determination module configured to determine whether to perform a data synchronization operation on the data to be synchronized based on metadata in the data to be synchronized. In response to determining to perform the data synchronization operation, the data item determination module 910 may store the data item to be synchronized in the first set of data items at the first data transmission device for synchronization with the target data transmission device.
[0165] In some exemplary embodiments, the apparatus 900 may further include a data storage module configured to, in response to determining to perform a data synchronization operation, store the to-be-synchronized data item in the first set of data items at the first data transmission device. The apparatus 900 may further include a data update module configured to, in response to determining to perform a data synchronization operation, update a corresponding data item in the first set of data items at the first data transmission device with the to-be-synchronized data item.
[0166] In some exemplary embodiments, the transmission information determination module 920 may determine a list of data transmission devices permitted for data synchronization based on the data transmission rules. The transmission information determination module 920 may determine a data transmission device associated with the first group of data items from the list of data transmission devices as a target data transmission device. The transmission information determination module 920 may send the data items to be synchronized to the target data transmission device.
[0167] In some exemplary embodiments, the transmission information determination module 920 may determine a message category that is allowed for data synchronization based on the data transmission rule. In response to determining that the message associated with the data item to be synchronized belongs to the message category that is allowed for data synchronization, the transmission information determination module 920 may send the data item to be synchronized to the target data transmission device.
[0168] In some exemplary embodiments, the transmission information determination module 920 may determine a group of data items allowed to be synchronized based on the data transmission rule. In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the transmission information determination module 920 may send the data items to be synchronized to the target data transmission device.
[0169] In some exemplary embodiments, the transmission information determination module 920 may determine whether the target data transmission device is the generator of the data to be synchronized based on an information item in the metadata indicating the generator of the data to be synchronized. In response to determining that the target data transmission device is not the generator of the data to be synchronized, the transmission information determination module 920 may send the data item to be synchronized to the target data transmission device.
[0170] In some exemplary embodiments, the metadata may include version information indicating the version of the data value, generator information indicating the generator of the data value, validity time indicating the length of time the data value is valid, existence time indicating the length of time corresponding to the existence period of the data value, data length indicating the data length of the data value and an identifier associated with the data value, and an encrypted identifier.
[0171] In some exemplary embodiments, the metadata may include information of an identifier associated with the data item to be synchronized, wherein the identifier and the data item to be synchronized form a key-value pair, wherein the identifier corresponds to the key in the key-value pair and the data item to be synchronized corresponds to the value in the key-value pair.
[0172] like Figure 10 As shown, electronic device 1000 is in the form of a general electronic device. Components of electronic device 1000 may include, but are not limited to, at least one processor 1010 or processing unit, memory 1020, storage device 1030, one or more communication units 1040, one or more input devices 1050, and one or more output devices 1060. Processor 1010 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 1020. In a multi-processor system, multiple processors execute computer-executable instructions in parallel to increase the parallel processing capabilities of electronic device 1000.
[0173] The electronic device 1000 typically includes a plurality of computer storage media. Such media can be any accessible media that is accessible to the electronic device 1000, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1020 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1030 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data and can be accessed within the electronic device 1000.
[0174] The electronic device 1000 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 10As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. Memory 1020 may include a computer program product 1025 having one or more program modules configured to perform the various methods or actions of various embodiments of the present disclosure.
[0175] The communication unit 1040 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 1000 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 1000 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or other network nodes.
[0176] Input device 1050 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 1060 may be one or more output devices, such as a display, a speaker, or a printer. Electronic device 1000 may also communicate with one or more external devices (not shown) via communication unit 1040 as needed, such as storage devices, display devices, or the like, with one or more devices that allow a user to interact with electronic device 1000, or with any device that allows electronic device 1000 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0177] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0178] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0179] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0180] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0181] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0182] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.
Claims
1. A method for data synchronization, comprising: Determining, at a first data transmission device in a data center network, a data item to be synchronized, the data item to be synchronized comprising a data value and metadata associated with the data value, the data item to be synchronized belonging to a first group of data items associated with at least one data transmission device in the data center network; as well as Based on a data transmission rule for the data center network, transmission information of the to-be-synchronized data item with respect to the at least one data transmission device is determined.
2. The method according to claim 1, wherein the transmission information is used to indicate at least one of the following: Whether to send the data item to be synchronized, or The target data transmission device is configured to receive the data item to be synchronized.
3. The method according to claim 1 , wherein determining the data items to be synchronized in the first set of data items comprises: generating the data value included in the data item to be synchronized and the metadata associated with the data value; as well as The data items to be synchronized are stored in the first set of data items at the first data transmission device for synchronization to the at least one data transmission device.
4. The method according to claim 3, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: Determining a list of data transmission devices allowed to perform data synchronization based on the data transmission rule; Determine a data transmission device belonging to the data transmission device list from the at least one data transmission device as the target data transmission device; as well as Send the data item to be synchronized to the target data transmission device.
5. The method according to claim 3, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: Determining message categories that are allowed to be synchronized based on the data transmission rules; as well as In response to determining that the message associated with the generated data item to be synchronized belongs to the message category allowing data synchronization, the data item to be synchronized is sent to the target data transmission device.
6. The method according to claim 2, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: determining a group of data items allowed to be synchronized based on the data transmission rule; as well as In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the data items to be synchronized are sent to the target data transmission device.
7. The method according to claim 1 , wherein determining the data items to be synchronized in the first set of data items comprises: receiving a candidate data item from the at least one data transfer device associated with the first set of data items; as well as The data items to be synchronized are determined based on the candidate data items.
8. The method according to claim 7, wherein determining the data item to be synchronized based on the candidate data item comprises at least one of the following: Determining the candidate data item as the data item to be synchronized; In response to determining that the at least one data transmission device belongs to a list of data transmission devices allowed to perform data synchronization, determining the candidate data item as the data item to be synchronized; In response to determining that the message associated with the candidate data item belongs to a message category that allows data synchronization, determining the candidate data item as the data item to be synchronized; or In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the candidate data item is determined as the data item to be synchronized.
9. The method according to claim 7, further comprising: determining whether to perform a data synchronization operation on the data to be synchronized based on the metadata in the data to be synchronized; as well as In response to determining to perform the data synchronization operation, the to-be-synchronized data item is stored in the first group of data items at the first data transmission device for synchronization to a target data transmission device.
10. The method according to claim 9, further comprising: In response to determining to perform the data synchronization operation, storing the to-be-synchronized data item in the first group of data items at the first data transmission device; or In response to determining to perform the data synchronization operation, corresponding data items in the first set of data items at the first data transmission device are updated using the data items to be synchronized.
11. The method according to claim 9, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: Determining a list of data transmission devices allowed to perform data synchronization based on the data transmission rule; Determine a data transmission device associated with the first group of data items from the data transmission device list as the target data transmission device; and Send the data item to be synchronized to the target data transmission device.
12. The method according to claim 9, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: Determining message categories that are allowed to be synchronized based on the data transmission rules; as well as In response to determining that the message associated with the to-be-synchronized data item belongs to the message category that allows data synchronization, the to-be-synchronized data item is sent to the target data transmission device.
13. The method according to claim 9, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: determining a group of data items allowed to be synchronized based on the data transmission rule; as well as In response to determining that the first group of data items belongs to the group of data items allowed to be synchronized, the data items to be synchronized are sent to the target data transmission device.
14. The method according to claim 9, wherein determining the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device comprises: determining, based on an information item in the metadata indicating a generator of the data to be synchronized, whether the target data transmission device is a generator of the data to be synchronized; as well as In response to determining that the target data transmission device is not a generator of the data to be synchronized, the data item to be synchronized is sent to the target data transmission device.
15. The method of claim 1, wherein the metadata comprises at least one of the following: Version information, indicating the version of the data value, Generator information, indicating the generator of the data value, Validity time, indicating the length of time the data value is valid, Existence time, indicating the length of time corresponding to the existence period of the data value, a data length indicating the data length of the data value and an identifier associated with the data value, and The encrypted identifier.
16. The method according to claim 1, wherein the metadata includes identification information associated with the data item to be synchronized, and The identifier and the data item to be synchronized form a key-value pair, the identifier corresponds to the key in the key-value pair, and the data item to be synchronized corresponds to the value in the key-value pair.
17. A device for data synchronization, comprising: a data item determination module configured to determine, at a first data transmission device in a data center network, a data item to be synchronized, the data item to be synchronized comprising a data value and metadata associated with the data value, the data item to be synchronized belonging to a first group of data items, the first group of data items being associated with at least one data transmission device in the data center network; as well as The transmission information determination module is configured to determine the transmission information of the to-be-synchronized data item with respect to the at least one data transmission device based on a data transmission rule for the data center network.
18. An electronic device comprising: at least one processor; as well as At least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 16 when executed by the at least one processor.
19. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions can be executed by a processor to implement the method according to any one of claims 1 to 16.
20. A computer program product tangibly stored in a computer storage medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of claims 1-16.