Data synchronization method and system

By dynamically calculating concurrent authorization requests in a dual-controller storage system, the problems of uneven resource utilization and link congestion are solved, data synchronization efficiency and IO performance are improved, and high-performance storage requirements are met.

CN122261869BActive Publication Date: 2026-07-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2026-05-25
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In dual-controller storage systems, existing technologies lack a feedback mechanism to dynamically adjust data concurrency based on real-time load, leading to uneven resource utilization, link congestion, and low data synchronization efficiency.

Method used

The first controller dynamically calculates and reissues authorization requests based on the total amount of data to be synchronized by the second controller and its own available resources, thereby achieving precise control over the data synchronization concurrency of the second controller and ensuring that its transmission rhythm, processing capacity, and link status are matched in real time.

Benefits of technology

It effectively avoids link congestion and resource idleness, improves resource utilization and data synchronization efficiency, ensures the IO performance and data synchronization stability of the dual-controller storage system, and meets the data redundancy backup requirements in high-performance storage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122261869B_ABST
    Figure CN122261869B_ABST
Patent Text Reader

Abstract

The application discloses a data synchronization method and system, and particularly relates to the technical field of data storage, which comprises the following steps: receiving an initial data packet sent by a second controller based on at least one initial authorization request, wherein the at least one initial authorization request is sent by a first controller to the second controller in advance; determining the number of authorization requests to be supplemented for completing data synchronization of the to-be-synchronized data in the second controller based on a preset single transmission data volume and a total amount of the to-be-synchronized data in the initial data packet; and supplementing at least one authorization request to the second controller based on the number of authorization requests to be supplemented, so that the second controller synchronizes the to-be-synchronized data to the first controller based on the at least one authorization request, under the condition that the first controller has allocable resources. The number of authorization requests issued by the first controller is dynamically adjusted according to the total amount of the to-be-synchronized data of the second controller in real time, link congestion and resource idling are effectively avoided, and the resource utilization and the data synchronization efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a data synchronization method and system. Background Technology

[0002] In a dual-controller storage system, to ensure high data availability, after receiving a write request from the host, controller A needs to synchronize the data to controller B for redundant backup before returning a write completion response to the host. Currently, in related technologies, data synchronization between controllers often adopts a method where controller A actively sends data and controller B passively receives it. This relies on static configuration for traffic control and lacks an effective mechanism for dynamic feedback and adjustment based on real-time load. This can easily lead to problems such as uneven resource utilization, link congestion, or low bandwidth utilization, thus restricting the overall data synchronization efficiency and input / output (IO) performance of the storage system. Summary of the Invention

[0003] This application provides a data synchronization method and system to at least solve the problems in related technologies, such as uneven resource utilization, link congestion, and low data synchronization efficiency during data synchronization between controllers due to the lack of a feedback mechanism for dynamically adjusting data concurrency based on real-time load.

[0004] This application provides a data synchronization method applied to a first controller, comprising: Receive an initial data packet sent by the second controller based on at least one initial authorization request, wherein the at least one initial authorization request is sent in advance by the first controller to the second controller; Based on the preset single transmission data volume and the total amount of data to be synchronized in the initial data packet, the number of re-send authorization requests required for the data to be synchronized in the second controller to complete the data synchronization is determined. The total amount of data to be synchronized is the total amount of data that the second controller needs to synchronize to the first controller. If the first controller has available resources, at least one authorization request is sent to the second controller based on the number of authorization requests to be reissued, so that the second controller can synchronize the data to be synchronized to the first controller based on at least one authorization request.

[0005] This application provides a data synchronization method applied to a second controller, comprising: Receive at least one initial authorization request sent by the first controller; Based on the first initial authorization request, the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data are determined. The first initial authorization request is any one of at least one initial authorization request. If the second controller has available resources, an initial data packet is constructed based on the first synchronized data and the total amount of data to be synchronized, and the initial data packet is sent to the first controller to receive at least one authorization request fed back by the first controller based on the total amount of data to be synchronized in the initial data packet; Based on at least one authorization request and the data to be synchronized, the data to be synchronized is synchronized to the first controller.

[0006] This application also provides a data synchronization system, including: First controller and second controller; The first controller is used to receive the initial data packet sent by the second controller based on at least one initial authorization request, and based on the preset single transmission data volume and the total amount of data to be synchronized in the initial data packet, determine the number of authorization requests to be resent for the data to be synchronized in the second controller to complete data synchronization, so that if there are allocable resources, at least one authorization request is resent to the second controller based on the number of authorization requests to be resent. The second controller is used to receive at least one initial authorization request sent by the first controller, and based on the first initial authorization request in the at least one initial authorization request, determine the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data. If there are available resources, based on the first synchronization data and the total amount of data to be synchronized, construct an initial data packet and send the initial data packet to the first controller to receive at least one authorization request, and based on the at least one authorization request and the data to be synchronized, synchronize the data to be synchronized to the first controller.

[0007] The data synchronization method and system provided in this application involve a first controller receiving an initial data packet sent by a second controller based on at least one initial authorization request, wherein the first controller has pre-sent the initial authorization request to the second controller. Based on a preset single transmission data volume and the total amount of data to be synchronized in the initial data packet, the number of supplementary authorization requests required for data synchronization in the second controller is determined, where the total amount of data to be synchronized is the total amount of data in the second controller that needs to be synchronized to the first controller. If the first controller has available resources, at least one supplementary authorization request is sent to the second controller based on the number of supplementary authorization requests, enabling the second controller to synchronize the data to be synchronized to the first controller based on at least one authorization request. This allows the first controller to dynamically adjust the number of authorization requests issued in real time according to the total amount of data to be synchronized in the second controller, effectively avoiding link congestion and resource idleness, improving resource utilization and data synchronization efficiency, ensuring the IO performance and data synchronization stability of the dual-controller storage system, and meeting the data redundancy backup requirements in high-performance storage scenarios. Attached Figure Description

[0008] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 A schematic diagram of the overall architecture of a storage system provided in an embodiment of this application; Figure 2 This is a schematic diagram illustrating a specific data synchronization method provided in an embodiment of this application. Figure 3 A flowchart illustrating the first data synchronization method applied to a first controller provided in an embodiment of this application; Figure 4 A flowchart illustrating a second data synchronization method applied to a first controller, provided in an embodiment of this application; Figure 5 This is a flowchart illustrating a third data synchronization method applied to a first controller, as provided in an embodiment of this application. Figure 6 This is a flowchart illustrating the fourth data synchronization method applied to the first controller provided in an embodiment of this application; Figure 7 A flowchart illustrating the first data synchronization method applied to a second controller provided in an embodiment of this application; Figure 8 A flowchart illustrating a second data synchronization method applied to a second controller, provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a data synchronization system provided in an embodiment of this application. Detailed Implementation

[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0011] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0012] The storage controller is primarily used for managing the hard drives and the data stored on them at the storage end, while also providing data access services to the server side. For example... Figure 1 The diagram illustrates the overall architecture of a storage system. During data access (IO) to the server, to ensure data security and high availability, data typically passes through various service modules such as cache, cache pool, Redundant Arrays of Independent Disks (RAID), and multi-disk. The storage device generally consists of two controllers forming a redundant system. The front end connects to the server via technologies such as Fibre Channel (FC) and Remote Direct Memory Access (RDMA), while the back end connects to the disks via protocols such as Serial Attached SCSI (SAS) and Non-Volatile Memory Express (NVMe), thus forming a redundant system.

[0013] In a dual-controller storage system, to ensure high data availability and business continuity, data written by the host needs to be redundantly backed up between the controllers. Specifically, after receiving a write request from the host, controller A needs to synchronize the data to controller B. Only after controller B confirms successful write can controller A return a write completion response to the host. During this process, the data synchronization efficiency between controllers directly affects the overall I / O performance of the storage system.

[0014] Currently, data synchronization between controllers in related technologies often adopts a method where controller A (sender) actively sends data and controller B (receiver) passively receives it. In specific implementation, the data synchronization process is uniformly managed through an inter-controller communication module, and traffic control is performed using a fixed-depth sending queue or static credit limit. The sending end sends data to the receiving end according to the preset queue depth or credit limit, and the receiving end passively processes the data and returns an acknowledgment.

[0015] However, due to the lack of a feedback mechanism to dynamically adjust transmission concurrency based on the real-time load of the sending end, the fixed queue depth or credit volume is difficult to match the actual needs when the business load fluctuates. With limited resources such as central processing unit (CPU) cores, memory, and physical link bandwidth, insufficient concurrency can lead to idle link bandwidth during peak load periods, while excessive concurrency can cause congestion at the receiving end during off-peak periods. This uneven resource utilization, link congestion, and low bandwidth utilization severely restrict the data synchronization efficiency and overall IO performance of dual-controller storage systems.

[0016] To address the issues of uneven resource utilization, link congestion, and low data synchronization efficiency during data synchronization between controllers caused by the lack of a feedback mechanism in related technologies that dynamically adjusts data concurrency based on real-time load, this application proposes a method where the first controller dynamically calculates and reissues authorization requests based on the total amount of data to be synchronized by the second controller and its own allocable resources. This enables precise control over the data synchronization concurrency of the second controller, ensuring that the transmission rhythm of the second controller matches the processing capacity and link status of the first controller in real time. This maximizes resource utilization and data synchronization efficiency while ensuring system stability.

[0017] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] For example, Figure 2 This is a schematic diagram illustrating a specific data synchronization method provided in an embodiment of this application. For example... Figure 2 As shown, the data synchronization framework of this application mainly consists of three parts, namely: Data interaction interface of the business layer: i.e. Figure 2 The data sending queue is located on the controller 1 side (corresponding to the second controller of this application, serving as the sending end); and the data processing queue is located on the controller 2 side (corresponding to the first controller of this application, serving as the receiving end). It is mainly used to receive and temporarily suspend service data. When a service module of controller 1 needs to send data to controller 2, it first puts the data into the data sending queue; after receiving the data, controller 2 puts the data into the data processing queue, waiting for processing by the upper-layer service module.

[0019] Cluster interaction concurrency control layer: i.e. Figure 2The layer consists of `initial_request` (request resource, corresponding to the authorization request in this application) and `target_response` (response resource). The `initial_request` is created by the first controller (controller 2) acting as the receiver and sent to the second controller (controller 1) acting as the sender, granting the second controller permission to send data once. Each `initial_request` records the target memory address (physical address) allocated by the first controller. The `target_response` is created by the second controller based on the received `initial_request` and records the control information for this data transmission, including the sequence number of the `initial_request` and the physical address allocated by the first controller. This layer is mainly used for overall control of concurrent interactions between the two controller nodes. By managing the generation, sending, matching, and recycling of request and response resources, it achieves global traffic scheduling for data synchronization.

[0020] Physical port concurrency control layer: i.e. Figure 2 The port_package resource pool (corresponding to the storage resource pool in this application) primarily performs concurrency control at the physical port level based on specific physical ports, such as NTB (Non-Transparent Bridge) / RDMA / FC, etc. During initialization, each physical port statically allocates a certain number of port_package resources based on its link type and transmission rate, forming an independent resource pool. Each port_package is a fixed-size DMA (Direct Memory Access) buffer (e.g., 4KB) used to actually carry the data to be sent or received. Resources within the pool belong only to the corresponding physical port, enabling fine-grained concurrency control and traffic management at the port level.

[0021] It should be noted that the above data synchronization framework is merely exemplary and should not be construed as a limitation of this application.

[0022] To help better understand the data synchronization method provided in this application, the following is combined with... Figure 2 The data synchronization framework shown further explains the embodiments of this application. Figure 3 This is a flowchart illustrating a first data synchronization method applied to a first controller, as provided in an embodiment of this application.

[0023] like Figure 3 As shown, the method includes the following steps: Step 101: Receive an initial data packet sent by the second controller based on at least one initial authorization request, wherein the at least one initial authorization request is sent in advance by the first controller to the second controller.

[0024] In some embodiments, the first controller specifically refers to the receiving end (corresponding to...) Figure 2 The second controller (controller 2) is responsible for receiving data and performing feedback control; the third controller specifically refers to the transmitting end (corresponding to...). Figure 2 The controller 1 in the system is responsible for sending synchronization data.

[0025] An initial authorization request is an authorization request resource sent in advance by the first controller to the second controller, which is used to grant the second controller the right to send data once. Each initial authorization request contains a sequence number and a physical memory address allocated by the first controller.

[0026] Optionally, at least one initial authorization request can be one or more, the number of which is pre-calculated and allocated by the first controller during the system initialization phase based on the type, transmission rate and preset single transmission data volume of the data synchronization link between the first controller and the second controller. It is the initial transmission permission issued by the first controller to start the data synchronization process between nodes.

[0027] The initial data packet is a data packet sent by the second controller based on the initial authorization request. Its header contains the total amount of data to be synchronized, as well as key information such as the sequence number and physical address of the initial authorization request.

[0028] Step 102: Based on the preset single transmission data volume and the total amount of data to be synchronized in the initial data packet, determine the number of authorization requests to be resent for the data to be synchronized in the second controller to complete the data synchronization.

[0029] In some embodiments, the preset data volume for a single transmission, i.e., the data volume that each port_package can carry (e.g., 4KB), can be preset according to the link capacity during system initialization, and is not limited in the embodiments of this application.

[0030] The total amount of data to be synchronized is the total amount of data that the second controller needs to synchronize with the first controller, which is also the total amount of all data that the second controller is currently waiting to send to the first controller. It is recorded in the data header by the second controller when sending data packets.

[0031] The number of authorization requests to be reissued refers to the number of additional authorization requests that the first controller needs to reissue to the second controller in order to complete all data synchronization.

[0032] In one example, after receiving a data packet, the first controller parses out the total amount of data to be synchronized contained within it, calculates the total number of authorization requests required to complete the synchronization of the remaining data based on a preset single transmission data volume, and simultaneously reclaims the initial authorization request associated with the data packet. Next, it obtains the number of authorization requests currently sent to the second controller that have not yet been reclaimed. By calculating the difference between the total number of authorization requests and the number of unreclaimed authorization requests, the number of additional authorization requests to be resent can be obtained. The calculation of the number of authorization requests to be resent enables the receiver to quantitatively predict the future load on the sender.

[0033] Step 103: If the first controller has available resources, at least one authorization request is sent to the second controller based on the number of authorization requests to be resent, so that the second controller can synchronize the data to be synchronized to the first controller based on at least one authorization request.

[0034] In some embodiments, the allocatable resource refers to the port_package resource available in the first controller, i.e., an idle receive buffer. Each authorization request to be sent must be bound to a port_package resource, and its physical address is stored as a remote address in the authorization request.

[0035] An authorization request is a data transmission authorization credential sent by the first controller to the second controller based on the total amount of data to be synchronized in the second controller. It includes a serial number and a physical address assigned by the first controller.

[0036] Optionally, before resending an authorization request, the first controller must first check whether there are enough idle resources in its local physical port resource pool. Only if there are enough idle resources will it request a port_package resource from the resource pool for each authorization request to be sent, record the physical address of the memory managed by the port_package resource, generate a new authorization request, and send it to the second controller in sequence. In this way, the second controller obtains a new transmission permission and can continue to send the remaining data. The entire process realizes closed-loop control of the receiver dynamically adjusting the concurrency based on the sender's load and its own resource status.

[0037] In summary, by receiving initial data packets sent by the second controller based on at least one initial authorization request, and based on the preset single transmission data volume and the total amount of data to be synchronized in the initial data packets, the number of supplementary authorization requests required for the second controller to complete data synchronization is determined. If the first controller has available resources, at least one supplementary authorization request is sent to the second controller based on the number of supplementary authorization requests, enabling the second controller to synchronize the data to be synchronized to the first controller based on at least one authorization request. This allows the first controller to dynamically adjust the number of authorization requests issued in real time according to the total amount of data to be synchronized in the second controller, ensuring that the concurrent data transmission volume of the second controller always matches the processing capacity and resource carrying capacity of the first controller. This effectively avoids link congestion and resource idleness, improves resource utilization and data synchronization efficiency, guarantees the IO performance and data synchronization stability of the dual-controller storage system, and meets the data redundancy backup requirements in high-performance storage scenarios.

[0038] Figure 4 A flowchart of the second data synchronization method proposed in this application, applied to the first controller, is further shown. Based on Figure 3 The illustrated embodiment further explains the steps preceding 101. Figure 4 This may include the following steps: Step 201: Based on the link type and link transmission rate of the data synchronization link between the first controller and the second controller, construct a first storage resource pool including at least one storage resource, and obtain at least one first storage resource from the first storage resource pool.

[0039] In some embodiments, at least one first storage resource is used to store synchronization data sent by the second controller based on at least one initial authorization request.

[0040] Data synchronization links refer to physical links used for data synchronization between controllers, such as NTB links (with high interaction efficiency and strong adaptability), RDMA links (with low latency and low computing power consumption), and FC links (with high transmission rate and strong stability). Different links have different data carrying capacity and unit data processing time. It is necessary to realize personalized and static precise allocation of storage resources according to the hardware characteristics of the data synchronization links to avoid problems such as some link resources being idle and some link resources being congested.

[0041] The first storage resource pool (i.e., the port_package resource pool) is the local physical port resource pool of the first controller, consisting of multiple storage resources (i.e., port_packages). Each port_package resource is a fixed-size (e.g., 4KB) DMA buffer used to receive synchronization data sent by the second controller. The number of storage resources in the first storage resource pool is determined by the link type and link transmission rate (e.g., 32Gb / s for FC links, 100Gb / s for RDMA links, etc.).

[0042] In one example, during system initialization, information such as link type and link transmission rate (e.g., a 32Gb / s FC link) is registered at the cluster interaction concurrency control layer for all physical links between the first and second controllers. For each physical link type, the required storage resources are calculated using the following formula: port_package_num = speed / payload_size / (1 second / port_package unit processing time) Here, `port_package_num` represents the amount of storage resources allocated to each physical link type; `speed` represents the link transmission rate (e.g., 32Gb / s for FC links); `payload_size` represents the amount of data each storage resource can carry (corresponding to a preset single transmission data amount, such as 4KB); and `port_package` represents the time required to transmit one `port_package` packet. After calculating the amount of storage resources allocated to each physical link, a fixed-size (e.g., 4KB) memory space is allocated to each `port_package`, and these memory-allocated `port_package`s are assigned to the corresponding physical ports, forming a storage resource pool (e.g., the first storage resource pool in the first controller). Resources in the pool are only used by that port. When an initial authorization request needs to be sent, the first controller requests a `port_package` from the first resource pool as the first storage resource.

[0043] Step 202: Generate an initial authorization request based on the first physical address of the first target storage resource, wherein the first target storage resource is any one of at least one first storage resource.

[0044] In some embodiments, the first target storage resource is any first storage resource obtained from the first storage resource pool; the first physical address is the physical address of the memory managed by the first target storage resource, used for DMA writing.

[0045] In one example, the first controller first requests an initial authorization request resource (i.e., the corresponding...) Figure 2 The initial authorization request is created by storing the `initiate_request` resource in the first storage resource pool and assigning it an initial sequence number (initially 0, incrementing thereafter). Simultaneously, the physical address of the first target storage resource obtained from the first storage resource pool is recorded within the `initiate_request`, completing the creation of the initial authorization request. At this point, the authorization request is bound to a real receive buffer, becoming a valid send permission credential.

[0046] Step 203: Send the initial authorization request to the second controller.

[0047] In some embodiments, the first controller sequentially sends the created initial authorization requests to the second controller via a physical port. Simultaneously, the first controller adds the sequentially sent initial authorization requests to its local authorization request queue (corresponding to...). Figure 2 The `initate_request_fifo` queue in the second controller records the number of initial authorization requests, with the sequence number incrementing from 0. It also records the number of initial authorization requests sent to the second controller awaiting a response. Upon receiving an initial authorization request, the second controller creates a corresponding response resource (`target_response`) to record control information for this data transmission, including the sequence number of the initial authorization request and the physical address allocated by the first controller carried in the initial authorization request. This information is then placed in the second controller's local response queue (corresponding to...). Figure 2 The `target_response_fifo` queue in the `<target_response_fifo>` is used to wait for subsequent data to be sent.

[0048] In summary, this application pre-constructs a physical port resource pool based on link rate and binds a real receive buffer to each authorization request, ensuring that each issued authorization has corresponding physical storage resources to support it, thus laying a resource foundation for subsequent feedback control.

[0049] Figure 5 A flowchart of the third data synchronization method proposed in this application, applied to the first controller, is further shown. Figure 3 The illustrated embodiment further explains steps 101 and 102. Figure 5 In the illustrated embodiment, step 101 is followed by steps 301, 302 and 303, and step 102 includes steps 304, 305 and 306. Figure 5 This may include the following steps: Step 301: Parse the initial data packet to obtain the first initial sequence number of the first initial authorization request associated with the initial data packet, the second physical address of the second target storage resource contained in the first initial authorization request, and the third physical address of the cached first synchronization data in the second controller.

[0050] In some embodiments, one initial authorization request corresponds to one initial data packet, meaning each initial authorization request is used only to authorize the sending of one data packet. The first initial sequence number is the sequence number recorded from the first initial authorization request and encapsulated in the header of the data packet when the second controller constructs the initial data packet, used to uniquely identify the initial authorization request corresponding to the initial data packet.

[0051] The second physical address of the second target storage resource is the target memory address that the first controller obtains from the local first storage resource pool and records in the first initial authorization request when generating the first initial authorization request. It is used to instruct the second controller to write the first synchronization data to the specified storage location of the first controller.

[0052] The third physical address is the physical address of the storage resource temporarily requested by the second controller from the local second storage resource pool (i.e., the storage resource pool in the second controller) before sending the first synchronization data, and is used as the sending buffer for the first synchronization data.

[0053] The first synchronization data is determined based on the first initial authorization request. That is, after the second controller receives the first initial authorization request sent by the first controller, it takes the current business data to be sent as the first synchronization data, caches it in the local storage resource corresponding to the third physical address, and then sends it to the first controller through the physical link.

[0054] By parsing the initial data packet to obtain the above information, the first controller can determine which authorization request the received data corresponds to, which pre-allocated storage location it should be stored in, and the source location of the data in the second controller, providing a basis for subsequent data storage and authorization revoke.

[0055] Step 302: Based on the second physical address and the third physical address, store the first synchronization data to the second target storage resource.

[0056] In some embodiments, the first controller initiates DMA transfer based on the parsed second physical address (i.e., the local receiving address) and third physical address (i.e., the address where the second controller caches synchronization data), directly writing the first synchronization data sent by the second controller to that memory address. Since the address is pre-allocated, the entire process does not require CPU intervention for copying, achieving zero-copy, high-efficiency reception.

[0057] Step 303: Based on the first initial serial number, reclaim the first initial authorization request.

[0058] In some embodiments, the first controller searches for a matching initial authorization request in the local `initiate_request_fifo` queue based on the sequence number in the data packet header, and removes it from the queue, indicating that the authorization has been used up. Simultaneously, the number of sent and pending authorization requests is updated. The `port_package` bound to the revoked authorization request is also released back to the storage resource pool for later use.

[0059] Step 304: Based on the preset single transmission data volume and the total amount of data to be synchronized, determine the total number of authorization requests required for the data to be synchronized to complete the data synchronization.

[0060] In some embodiments, the total number of authorization requests refers to the total number of authorization requests required to complete the synchronization of all data in the second controller. The formula for calculating the total number of authorization requests, resource_need, is as follows: resource_need = data_size_wait / payload_size + C Where data_size_wait is the total amount of data to be synchronized; payload_size is the preset data size for a single transmission (e.g., 4KB); and C is an empirical buffer value (e.g., 3). This calculation formula converts the number of bytes corresponding to the data to be synchronized fed back by the second controller into the number of authorization requests required, and reserves a certain margin to cope with network latency and jitter.

[0061] Step 305: Based on the total number of requests for at least one initial authorization request and the number of initial authorization requests that have been reclaimed, determine the number of unreclaimed initial authorization requests.

[0062] In some embodiments, the total number of requests represents the total number of initial authorization requests sent by the first controller to the second controller; the number of requests that have been reclaimed represents the number of authorization requests for which the first controller has received the corresponding data packet and reclaimed the initial authorization request; and the number of requests that have not been reclaimed represents the number of authorization requests for which authorization requests have been sent but for which the corresponding data packet has not yet been received.

[0063] The unrecovered quantity is the difference between the total requested quantity and the quantity already recovered.

[0064] Step 306: Determine the number of authorization requests to be reissued based on the total number of authorization requests and the number of unrecovered requests.

[0065] In some embodiments, the number of authorization requests to be resent represents the number of additional authorization requests that the first controller needs to send to the second controller in order to fully synchronize all data to be synchronized from the second controller to the first controller, excluding the initial authorization requests that have already been sent but not yet retrieved. Based on the sent but not yet retrieved authorization requests, the first controller can adjust the number of authorization requests to be resent in real time. The formula for calculating the number of authorization requests to be resent is as follows: resource_tobesend_num = resource_need - resource_sended_num Wherein, resource_tobesend_num represents the number of authorization requests to be reissued; resource_need represents the total number of authorization requests; and resource_sended_num represents the number of unrecovered requests. Through this quantitative calculation, the first controller can accurately adjust the number of authorizations issued based on the total amount of data to be synchronized reported by the second controller in real time, so that the data synchronization concurrency matches the actual load of the second controller.

[0066] In summary, this application uses the first controller to parse the total amount of data to be synchronized actively reported by the second controller, calculates the ideal concurrency requirements by combining the preset single transmission data volume, and then dynamically determines the number of authorizations to be reissued based on the number of authorization requests that have been issued but not yet reclaimed. This realizes a load-aware feedback concurrency control mechanism driven by the first controller, which effectively solves the problems of uneven resource utilization, link congestion or bandwidth idleness caused by static configuration in related technologies, and improves the data synchronization efficiency and overall IO performance of the dual-controller storage system.

[0067] Figure 6 A flowchart of the fourth data synchronization method proposed in this application, applied to the first controller, is further shown. Figure 3 The illustrated embodiment further explains step 103. Figure 6 This may include the following steps: Step 401: Based on the resource acquisition frequency and resource utilization rate of the first storage resource pool in the first controller, determine whether there are any allocable resources in the first controller.

[0068] In some embodiments, the resource acquisition frequency refers to the frequency at which the first controller acquires storage resources from the first storage resource pool; that is, the shorter the storage resource acquisition time interval, the higher the resource acquisition frequency.

[0069] Resource utilization rate refers to the proportion of the number of storage resources that are occupied in the first storage resource pool to the total number of storage resources in the first storage resource pool. For example, if the first storage resource pool contains 100 storage resources and 80 storage resources are occupied, then the resource utilization rate is 80%.

[0070] Allocable resources refer to the storage resources in the first storage resource pool that are in an idle state and can be used to receive new synchronized data.

[0071] Optionally, this application determines whether the first controller has allocable resources based on the resource acquisition frequency and resource utilization rate by: determining the first resource acquisition frequency and the first resource utilization rate of the first storage resource pool; determining that the first controller has no allocable resources when the first resource acquisition frequency is greater than a first preset frequency threshold and the first resource utilization rate is greater than a first preset resource utilization threshold; and determining that the first controller has allocable resources when the first resource acquisition frequency is less than or equal to the first preset frequency threshold, or the first resource utilization rate is less than or equal to the first preset resource utilization threshold.

[0072] Wherein, the first resource acquisition frequency corresponds to the resource acquisition frequency of the first storage resource pool; the first resource utilization rate corresponds to the resource utilization rate of the first storage resource pool.

[0073] The first preset frequency threshold is determined based on the waiting time (e.g., average waiting time) of storage resources in the first controller in the physical link drive queue. That is, when the time interval for acquiring storage resources in the first storage resource pool is less than the waiting time of storage resources in the physical link drive queue, it indicates that the frequency of acquiring storage resources in the first storage resource pool is too fast, exceeding the actual processing capacity of the physical port drive layer, which may cause drive queue congestion.

[0074] The first preset resource usage threshold is usually a percentage threshold of the total capacity of the first storage resource pool (such as 80%, which is not limited in the embodiments of this application). It is the core basis for the first controller to determine whether its storage resource pool has sufficient spare capacity. If the first resource usage rate exceeds the threshold, it indicates that the first storage resource pool has insufficient spare resources.

[0075] Step 402: If it is determined that there are allocable resources on the first controller, at least one authorization request is sent to the second controller based on the number of authorization requests to be resent.

[0076] In some embodiments, after determining that there are allocable resources, the first controller applies for a corresponding number of storage resources from the first storage resource pool based on the number of authorization requests to be reissued calculated in step 306, generates a new authorization request containing its physical address for each storage resource, and sends it to the second controller. The actual number of authorization requests issued is limited by the current number of idle resources in the resource pool, which can improve data concurrency and ensure system stability.

[0077] In summary, this application, by adding a resource availability check before reissued authorization requests, physically limits the maximum concurrent processing capacity of the first controller, ensuring that the number of reissued authorization requests is always controlled within the capacity of the first controller. This avoids the problem of uneven resource utilization and eliminates system anomalies caused by concurrent overload, significantly improving the data synchronization efficiency and reliability of the dual-controller storage system.

[0078] Figure 7 This is a flowchart illustrating the first data synchronization method applied to a second controller provided in an embodiment of this application.

[0079] like Figure 7 As shown, the method includes the following steps: Step 501: Receive at least one initial authorization request sent by the first controller.

[0080] In some embodiments, the second controller receives an initial authorization request from the first controller via a physical port, parses it to obtain the sequence number and physical address information allocated by the first controller from the initial request. Based on this information, the second controller creates a corresponding response resource (target_response), records the sequence number and physical address in the target_response resource, and adds the target_response resource to the local target_response_fifo queue for use when sending subsequent data.

[0081] Step 502: Based on the first initial authorization request, determine the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data. The first initial authorization request is any one of at least one initial authorization request.

[0082] In some embodiments, the first synchronization data refers to the specific data or message that the second controller's service layer needs to send to the first controller.

[0083] In one example, when the business module of the second controller has data to be synchronized, it puts the data into the data sending queue. Next, the second controller retrieves the `target_response` header (associated with the first initial authorization request) from the `target_response_fifo` queue. Simultaneously, it determines the first synchronization data (i.e., the data to be sent this time) and counts the total amount of data to be synchronized in the entire data sending queue, excluding the first synchronization data. This total amount of data to be synchronized is recorded in `target_response`, ready to be sent along with the data packet.

[0084] Step 503: If the second controller has available resources, an initial data packet is constructed based on the first synchronized data and the total amount of data to be synchronized, and the initial data packet is sent to the first controller to receive at least one authorization request from the first controller based on the total amount of data to be synchronized in the initial data packet.

[0085] In some embodiments, available resources refer to idle storage resources in the local storage resource pool of the second controller, which are used to temporarily store synchronization data to be sent.

[0086] In one example, if the second controller has available resources, it will request a storage resource (i.e., the port_package resource) from its local storage resource pool and copy the data to be synchronized from the data sending queue one by one into the memory managed by the port_response resource until the memory is full or there is no data or message to be sent in the data sending queue. At this point, the data in the storage resource is the first synchronization data. Then, the physical address of the memory managed by the port_package resource is recorded in the target_response. At this time, the target_response contains the sequence number of the first initial authorization request, the physical address allocated by the first controller (called the remote memory address), the total amount of data to be synchronized, and the physical address of the second controller caching the first synchronization data (called the local memory address). Finally, the sequence number of the first initial authorization request, the remote memory address, and the total amount of data to be synchronized in the target_response are packaged into a data header and sent to the first controller through the physical link. At the same time, the first synchronization data is sent via DMA using the local memory address in the target_response. The controller then waits for the first controller to respond with a new authorization request.

[0087] Step 504: Based on at least one authorization request and the data to be synchronized, synchronize the data to be synchronized to the first controller.

[0088] In some embodiments, after sending the current data packet, the second controller waits for the first controller to resend a new authorization request based on the total amount of data to be synchronized. Upon receiving the new authorization request, the second controller converts it into a new response resource and continues sending the remaining data to be synchronized. This process repeats until all the remaining data to be synchronized in the second controller's data sending queue is synchronized to the first controller. The entire process implements a collaborative mechanism where the sender sends data with a valid certificate and the receiver provides certificates on demand.

[0089] In this way, when the second controller's business module generates synchronization data (IO data, control messages, etc.) that needs to be sent to the first controller, the second controller's business module will batch-deploy all data or messages to be sent into the second controller's local data transmission queue, triggering the second controller to initiate inter-controller data synchronization. The data transmission process is triggered by `target_response` resource calls, requires `port_package` resource requests for transmission, uses DMA direct memory access as the transmission method, and relies on resource status feedback as the core control basis. The entire process achieves real-time detection of resource usage and intelligent start / stop of the transmission process, effectively avoiding resource congestion and data loss.

[0090] In summary, this application achieves orderly and controllable data transmission by having the second controller first receive the authorization request from the first controller, then determine the total amount of data to be synchronized based on the authorization request, construct and send the initial data packet when it has available resources, and finally complete the full synchronization of the remaining data based on the authorization request fed back by the first controller. This ensures the reliability of the data synchronization process and forms a closed loop with the dynamic feedback mechanism of the first controller, further improving the stability and transmission efficiency of data synchronization between controllers.

[0091] Figure 8 A flowchart of the second data synchronization method proposed in this application for a second controller is further shown. Figure 7 The illustrated embodiment, where available resources exist on the second controller, constructs an initial data packet based on the first synchronization data and the total amount of data to be synchronized, which may include the following steps: Step 601: Determine whether there are available resources in the second storage resource pool in the second controller. The second storage resource pool is pre-built based on the link type and link transmission rate of the data synchronization link between the first controller and the second controller.

[0092] In some embodiments, the second storage resource pool is a physical port resource pool local to the second controller, similar to the first storage resource pool in the first controller, and is constructed based on the link type and link transmission rate of the data synchronization link between the two controllers.

[0093] Optionally, determining whether there are available resources in the second storage resource pool in the second controller includes: determining the second resource acquisition frequency and the second resource utilization rate of the second storage resource pool; if the second resource acquisition frequency is greater than a second preset frequency threshold and the second resource utilization rate is greater than a second preset resource utilization threshold, determining that there are no available resources in the second storage resource pool; if the second resource acquisition frequency is less than or equal to the second preset frequency threshold, or the second resource utilization rate is less than or equal to the second preset resource utilization threshold, determining that there are available resources in the second storage resource pool.

[0094] Among them, the second resource acquisition frequency corresponds to the resource acquisition frequency of the second storage resource pool; the second resource utilization rate corresponds to the resource utilization rate of the second storage resource pool.

[0095] The second preset frequency threshold is determined based on the waiting time (e.g., average waiting time) of the storage resources in the second controller in the physical link drive queue. That is, when the time interval for acquiring storage resources in the second storage resource pool is less than the waiting time for the storage resources in the physical link drive queue, it indicates that the acquisition frequency of storage resources in the second storage resource pool is too fast, exceeding the actual processing capacity of the physical port drive layer, which may cause congestion in the drive queue.

[0096] The second preset resource usage threshold is usually a percentage threshold of the total capacity of the second storage resource pool (such as 80%, which is not limited in the embodiments of this application). It is the core basis for the second controller to determine whether its storage resource pool has sufficient spare capacity. If the second resource usage rate exceeds the threshold, it indicates that the first storage resource pool has insufficient spare resources.

[0097] Step 602: If it is determined that there are available resources in the second storage resource pool, the second storage resource is obtained from the second storage resource pool, and the first synchronization data is cached in the second storage resource to construct the initial data packet according to the third physical address of the second storage resource and the total amount of data to be synchronized.

[0098] In some embodiments, after determining that there are available resources, the second controller requests a port_package (i.e., the second storage resource) from the second storage resource pool, copies the first synchronization data to the second storage resource, and constructs a complete data packet together with the physical address managed by the second storage resource (i.e., the third physical address), the sequence number of the authorization request already in the response resource, the physical address allocated by the first controller, and the total amount of data to be synchronized, and sends it to the first controller.

[0099] In summary, this application utilizes a second controller to first determine the availability of resources based on the resource acquisition frequency and utilization rate of the local second storage resource pool. Then, when resources are sufficient, it acquires the corresponding storage resources to cache synchronized data, constructs and sends data packets. This achieves reliable control over the data transmission process at the physical port level, further improving the real-time feedback concurrency control mechanism between controllers. While enhancing resource utilization, it also ensures system stability and response time.

[0100] In summary, the effects of the data synchronization method in this application are as follows: 1) Improved data synchronization efficiency: The first controller (receiving end) dynamically reissues authorization requests based on the total amount of data to be synchronized reported in real time by the second controller (sending end), so that the data synchronization concurrency matches the actual load of the sending end. This maximizes bandwidth utilization while avoiding link congestion, significantly improving the data synchronization efficiency and overall IO performance of the dual-controller storage system.

[0101] 2) Achieve precise concurrency control: By pre-calculating the amount of data transmitted in a single transmission and the total amount of data to be synchronized, and combining the number of authorized requests that have been sent but not yet retrieved, the number of authorized requests to be resent is accurately determined, forming a load-aware feedback concurrency control mechanism driven by the receiver, which overcomes the defect of static configuration in related technologies that cannot adapt to load fluctuations.

[0102] 3) Ensuring system stability: By introducing a dual judgment mechanism based on resource acquisition frequency and resource utilization before re-issuing authorization at the receiving end, proactive rate limiting is implemented when the utilization rate is high and storage resource requests are too fast, ensuring that the receiving end does not exceed its physical receiving capacity for concurrency. At the same time, a similar port resource judgment is introduced at the sending end, forming a two-way protection mechanism to effectively prevent system crashes caused by resource exhaustion, ensuring the stable operation of the storage system under high load, and improving resource utilization while ensuring system stability and response time.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0104] Embodiments of this application also provide a data synchronization system 900. Figure 9 This is a schematic diagram of the structure of a data synchronization system provided in an embodiment of this application, as shown below. Figure 9 As shown, it includes: First controller 910 and second controller 920; The first controller 910 is used to receive the initial data packet sent by the second controller 920 based on at least one initial authorization request, and based on the preset single transmission data volume and the total amount of data to be synchronized in the initial data packet, determine the number of authorization requests to be resent for the data to be synchronized in the second controller 920 to complete data synchronization, so that if there are allocable resources, at least one authorization request is resent to the second controller 920 based on the number of authorization requests to be resent. The second controller 920 is configured to receive at least one initial authorization request sent by the first controller 910, and based on the first initial authorization request in the at least one initial authorization request, determine the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data. If available resources exist, it constructs an initial data packet based on the first synchronization data and the total amount of data to be synchronized, and sends the initial data packet to the first controller 910 to receive at least one authorization request, and synchronize the data to be synchronized to the first controller 910 based on the at least one authorization request and the data to be synchronized.

[0105] For a description of the features in the embodiment corresponding to the data synchronization system, please refer to the relevant description of the embodiment corresponding to the data synchronization method, which will not be repeated here.

[0106] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described data synchronization method embodiments.

[0107] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described data synchronization method embodiments at runtime.

[0108] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0109] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data synchronization method embodiments.

[0110] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data synchronization method embodiments.

[0111] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0112] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0113] The foregoing has provided a detailed description of a data synchronization method, system, electronic device, storage medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A data synchronization method, characterized in that, Applied to a first controller, the method includes: The system receives an initial data packet sent by the second controller based on at least one initial authorization request, wherein the at least one initial authorization request is sent in advance by the first controller to the second controller, and the initial data packet includes the total amount of data to be synchronized, the sequence number corresponding to the initial authorization request, and physical address information. Based on a preset single transmission data volume, the total amount of data to be synchronized, and a preset buffer value, the total number of authorization requests required for the data to be synchronized in the second controller to complete data synchronization is determined. Then, based on the difference between the total number of authorization requests and the unrecovered quantity corresponding to the at least one initial authorization request, the number of supplementary authorization requests required for the data to be synchronized to complete data synchronization is determined. The total amount of data to be synchronized is the total amount of data in the second controller that needs to be synchronized to the first controller. The unrecovered quantity is the difference between the total number of requests corresponding to the at least one initial authorization request and the recovered quantity corresponding to the recovered initial authorization requests in the at least one initial authorization request. The total number of authorization requests is determined by the following formula: resource_need = data_size_wait / payload_size + C, Wherein, data_size_wait is the total amount of data to be synchronized, payload_size is the preset amount of data transmitted in a single transmission, and C is the preset buffer value; If the first controller has available resources, at least one authorization request is sent to the second controller based on the number of authorization requests to be reissued, so that the second controller can synchronize the data to be synchronized to the first controller based on the at least one authorization request.

2. The method according to claim 1, characterized in that, Prior to receiving the initial data packet sent by the second controller based on at least one initial authorization request, the method includes: Based on the link type and link transmission rate of the data synchronization link between the first controller and the second controller, a first storage resource pool including at least one storage resource is constructed, and at least one first storage resource is obtained from the first storage resource pool. The at least one first storage resource is used to store the synchronization data sent by the second controller based on the at least one initial authorization request. An initial authorization request is generated based on the first physical address of the first target storage resource, wherein the first target storage resource is any one of the at least one first storage resources. The initial authorization request is sent to the second controller.

3. The method according to claim 1, characterized in that, After receiving the initial data packet sent by the second controller based on at least one initial authorization request, the method includes: Parse the initial data packet to obtain the first initial sequence number of the first initial authorization request associated with the initial data packet, the second physical address of the second target storage resource contained in the first initial authorization request, and the third physical address of the first synchronization data cached in the second controller, wherein the first synchronization data is determined based on the first initial authorization request; Based on the second physical address and the third physical address, the first synchronized data is stored in the second target storage resource; Based on the first initial serial number, the first initial authorization request is revoked.

4. The method according to claim 1, characterized in that, When the first controller has available resources, sending at least one additional authorization request to the second controller based on the number of authorization requests to be reissued includes: Based on the resource acquisition frequency and resource utilization rate of the first storage resource pool in the first controller, determine whether the first controller has any allocable resources; If it is determined that the first controller has allocable resources, at least one authorization request is sent to the second controller based on the number of authorization requests to be reissued.

5. The method according to claim 4, characterized in that, Determining whether the first controller has allocable resources based on the resource acquisition frequency and resource utilization rate of the first storage resource pool in the first controller includes: Determine the first resource acquisition frequency and the first resource utilization rate of the first storage resource pool; If the first resource acquisition frequency is greater than the first preset frequency threshold and the first resource utilization rate is greater than the first preset resource utilization threshold, it is determined that the first controller has no allocable resources. If the first resource acquisition frequency is less than or equal to the first preset frequency threshold, or the first resource utilization rate is less than or equal to the first preset resource utilization threshold, it is determined that the first controller has allocable resources.

6. A data synchronization method, characterized in that, Applied to a second controller, the method includes: Receive at least one initial authorization request sent by the first controller; Based on the first initial authorization request, the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data are determined, wherein the first initial authorization request is any one of the at least one initial authorization requests; If the second controller has available resources, an initial data packet is constructed based on the first synchronized data and the total amount of data to be synchronized, and the initial data packet is sent to the first controller to receive at least one authorization request fed back by the first controller based on the total amount of data to be synchronized in the initial data packet. The initial data packet includes the total amount of data to be synchronized, the sequence number corresponding to the initial authorization request, and physical address information. Based on a preset single transmission data volume, the total amount of data to be synchronized, and a preset buffer value, the total number of authorization requests required for the data to be synchronized in the second controller to complete data synchronization is determined. Then, based on the difference between the total number of authorization requests and the unrecovered quantity corresponding to the at least one initial authorization request, the number of supplementary authorization requests required for the data to be synchronized to complete data synchronization is determined. The total amount of data to be synchronized is the total amount of data in the second controller that needs to be synchronized to the first controller. The unrecovered quantity is the difference between the total number of requests corresponding to the at least one initial authorization request and the recovered quantity corresponding to the recovered initial authorization requests in the at least one initial authorization request. The total number of authorization requests is determined by the following formula: resource_need = data_size_wait / payload_size + C, Wherein, data_size_wait is the total amount of data to be synchronized, payload_size is the preset amount of data transmitted in a single transmission, and C is the preset buffer value; Based on the at least one authorization request and the data to be synchronized, the data to be synchronized is synchronized to the first controller.

7. The method according to claim 6, characterized in that, When the second controller has available resources, constructing the initial data packet based on the first synchronization data and the total amount of data to be synchronized includes: Determine whether there are available resources in the second storage resource pool in the second controller. The second storage resource pool is pre-built based on the link type and link transmission rate of the data synchronization link between the first controller and the second controller. If it is determined that there are available resources in the second storage resource pool, the second storage resource is obtained from the second storage resource pool, and the first synchronization data is cached in the second storage resource to construct the initial data packet according to the third physical address of the second storage resource and the total amount of data to be synchronized.

8. The method according to claim 7, characterized in that, Determining whether there are available resources in the second storage resource pool in the second controller includes: Determine the second resource acquisition frequency and the second resource utilization rate of the second storage resource pool; If the second resource acquisition frequency is greater than the second preset frequency threshold and the second resource utilization rate is greater than the second preset resource utilization threshold, it is determined that there are no available resources in the second storage resource pool. If the second resource acquisition frequency is less than or equal to the second preset frequency threshold, or the second resource utilization rate is less than or equal to the second preset resource utilization threshold, it is determined that there are available resources in the second storage resource pool.

9. A data synchronization system, characterized in that, The system includes: First controller and second controller; The first controller is configured to receive an initial data packet sent by the second controller based on at least one initial authorization request. The initial data packet includes the total amount of data to be synchronized, the sequence number corresponding to the initial authorization request, and physical address information. Based on a preset single transmission data volume, the total amount of data to be synchronized, and a preset buffer value, the first controller determines the total number of authorization requests required for the data to be synchronized in the second controller to complete data synchronization. Then, based on the difference between the total number of authorization requests and the unrecovered quantity corresponding to the at least one initial authorization request, the first controller determines the number of supplementary authorization requests required for the data to be synchronized to complete data synchronization. If allocable resources exist, the first controller reissues at least one authorization request to the second controller based on the number of supplementary authorization requests. The total amount of data to be synchronized is the total amount of data in the second controller that needs to be synchronized to the first controller. The unrecovered quantity is the difference between the total number of requests corresponding to the at least one initial authorization request and the recovered quantity corresponding to the recovered initial authorization requests in the at least one initial authorization request. The total number of authorization requests is determined by the following formula: resource_need = data_size_wait / payload_size + C, Wherein, data_size_wait is the total amount of data to be synchronized, payload_size is the preset amount of data transmitted in a single transmission, and C is the preset buffer value; The second controller is configured to receive at least one initial authorization request sent by the first controller, and based on the first initial authorization request in the at least one initial authorization request, determine the first synchronization data and the total amount of data to be synchronized corresponding to the first synchronization data. If available resources exist, the second controller constructs the initial data packet based on the first synchronization data and the total amount of data to be synchronized, and sends the initial data packet to the first controller to receive the at least one authorization request, and synchronizes the data to be synchronized to the first controller based on the at least one authorization request and the data to be synchronized.