Remote synchronization method, system, storage medium and electronic device for storing data

By constructing a state machine in the remote replicated storage relationship pair to provide feedback on the synchronization process and handle abnormal states, the problem of data synchronization difficulties caused by abnormal interruptions during the synchronization process of asynchronous remote replicated storage volume relationship pairs is solved, and more stable data synchronization recovery is achieved.

CN114968113BActive Publication Date: 2026-03-17JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Asynchronous remote replication storage volume relationships are susceptible to network disconnections, synchronization service crashes, or unexpected power outages during the synchronization process, leading to abnormal synchronization interruptions and making data synchronization recovery difficult.

Method used

By constructing a state machine for remote replication storage pairs, the synchronization process is fed back and abnormal states are handled. The state machine is used to report synchronization failures so that synchronization can be quickly restored, thereby improving synchronization stability and fault tolerance.

Benefits of technology

It effectively improves the stability and fault tolerance of data synchronization between storage systems, ensuring stable recovery of the data synchronization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968113B_ABST
    Figure CN114968113B_ABST
Patent Text Reader

Abstract

The application provides a remote synchronization method of storage data, comprising the following steps: receiving a synchronization instruction; determining a remote copy storage relationship pair corresponding to the synchronization instruction; determining a state machine of the remote copy storage relationship pair; if the state machine is waiting for synchronization, executing data synchronization of the remote copy storage relationship pair when a synchronization time condition is met. The application constructs a state machine of data synchronization between remote copy storage relationship pairs, and feeds back a synchronization process by using the state machine according to the state machine of the remote copy storage relationship pair when executing data synchronization, and can further feed back an abnormal state when a synchronization exception occurs, so as to recover the synchronization exception as soon as possible, thereby effectively improving synchronization stability and fault tolerance capability between storage systems. The application also discloses a remote synchronization system of storage data, an electronic device and a computer readable storage medium, which have the above beneficial effects, and details are not described herein.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a remote synchronization method for storing data, a remote synchronization system for storing data, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In storage systems, remote replication enables disaster recovery mechanisms for different storage services located in different locations. Two storage volumes in different locations form an asynchronous remote replication storage volume pair to achieve data synchronization. In practice, asynchronous remote replication storage volume pairs often encounter accidents such as network outages, synchronization service crashes, or unexpected power outages during synchronization. These accidents can abnormally interrupt the synchronization process, directly affecting synchronization. Furthermore, data synchronization after an abnormal interruption is prone to errors, making data recovery difficult.

[0003] Therefore, how to improve the stability of remote data synchronization is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this application is to provide a remote data synchronization method, a remote data synchronization system, an electronic device, and a computer-readable storage medium to improve the stability of remote data synchronization.

[0005] To achieve the above objectives, this application provides a remote synchronization method for stored data, comprising:

[0006] Receive synchronization command;

[0007] Determine the remote copy storage relationship pair corresponding to the synchronization command;

[0008] The state machine that determines the remote replication storage relationship pair;

[0009] If the state machine is waiting for synchronization, the data synchronization of the remote copy storage relationship pair will be performed when the synchronization time condition is met.

[0010] Optionally, before performing data synchronization of the remote replicated storage relationship pair, the method further includes:

[0011] Detect the presence status of the storage units on both sides of the remote replication storage relationship;

[0012] If one end of the storage unit is not in place, the state machine is changed to an exception at the other end.

[0013] Optionally, if the state machine is waiting for synchronization, performing data synchronization of the remote replicated storage relationship pair when the synchronization time condition is met includes:

[0014] If the state machine is waiting for incremental synchronization, perform incremental data synchronization of the remote replicated storage relationship pair;

[0015] If the state machine is waiting for full synchronization, perform full data synchronization of the remote replication storage relationship pair.

[0016] Optionally, performing data synchronization of the remote replicated storage relationship pair includes:

[0017] The remote replication storage relationship pair is added to the processing queue, and data synchronization is performed once in each synchronization cycle according to the creation time of the remote replication storage relationship pair;

[0018] During data synchronization, the state machine is changed from waiting to synchronize to synchronizing.

[0019] Optionally, if the state machine is remotely disconnected, it further includes:

[0020] The state machine of the remote replication storage relationship is changed from being disconnected at the remote end to waiting for incremental synchronization;

[0021] If the remote replication storage pair has an automatic recovery parameter setting, the state machine is changed to be synchronizing according to the automatic recovery parameter setting, and data synchronization of the remote replication storage pair is performed.

[0022] If the remote replication storage pair does not have an automatic recovery parameter setting, the state machine of the remote replication storage pair remains in the state of synchronization.

[0023] Optionally, when performing data synchronization once per synchronization cycle based on the creation time of the remote replicated storage relationship pair, if the state machine of the remote replicated storage relationship pair is currently synchronizing, the method further includes:

[0024] Change the state machine of the remote replicated storage relationship pair to wait for incremental synchronization, and check whether there is any anomaly in the remote replicated storage relationship pair;

[0025] If there are no anomalies in the remote replication storage pair, the state machine is changed from waiting for incremental synchronization to synchronizing, and the data synchronization of the remote replication storage pair is performed.

[0026] If there is an anomaly in the remote copy storage relationship, upload the anomaly.

[0027] Optionally, if a recovery command is detected, the following may also be included:

[0028] Obtain the state machine of each remote copy storage relationship corresponding to the recovery instruction;

[0029] Perform recovery operations on remote replicated storage pairs that are in a state of waiting for incremental synchronization or that have been disconnected at the remote end.

[0030] This application also provides a remote synchronization system for storing data, including:

[0031] The instruction receiving module is used to receive synchronization instructions;

[0032] The target determination module is used to determine the remote copy storage relationship pair corresponding to the synchronization instruction;

[0033] The state machine detection module is used to determine the state machine of the remote copy storage relationship pair;

[0034] The data synchronization module is used to perform data synchronization of the remote copy storage relationship pair when the synchronization time condition is met, if the state machine is waiting for synchronization.

[0035] To achieve the above objectives, this application provides a computer-readable storage medium storing a remote synchronization program for storing data, wherein the remote synchronization program, when executed by a processor, implements the steps of the remote synchronization method for storing data as described above.

[0036] This application also provides an electronic device, which includes a memory and a processor. The memory stores a remote synchronization method program for stored data that can run on the processor. When the remote synchronization program is executed by the processor, it is implemented as follows:

[0037] Receive synchronization command;

[0038] Determine the remote copy storage relationship pair corresponding to the synchronization command;

[0039] The state machine that determines the remote replication storage relationship pair;

[0040] If the state machine is waiting for synchronization, the data synchronization of the remote copy storage relationship pair will be performed when the synchronization time condition is met.

[0041] As can be seen from the above solutions, the remote synchronization method for stored data provided in this application includes:

[0042] Receive a synchronization command; determine the remote replication storage relationship pair corresponding to the synchronization command; determine the state machine of the remote replication storage relationship pair; if the state machine is waiting for synchronization, perform data synchronization of the remote replication storage relationship pair when the synchronization time condition is met.

[0043] This application constructs a state machine for data synchronization between remotely replicated storage pairs. During data synchronization, the state machine provides feedback on the synchronization process based on the state machine of the remotely replicated storage pairs. It can also provide feedback on abnormal states when synchronization fails, so as to recover from synchronization failures as soon as possible, effectively improving the synchronization stability and fault tolerance between storage systems.

[0044] This application also discloses a remote synchronization system for storing data, an electronic device, and a computer-readable storage medium, which can achieve the same technical effects as described above. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0046] Figure 1 This is a flowchart of a remote data synchronization method disclosed in an embodiment of this application;

[0047] Figure 2 A flowchart illustrating another remote data synchronization method disclosed in an embodiment of this application;

[0048] Figure 3 This is a structural diagram of a remote data synchronization system disclosed in an embodiment of this application;

[0049] Figure 4 This is a structural diagram of an electronic device disclosed in an embodiment of this application;

[0050] Figure 5 This is a structural diagram of another electronic device disclosed in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0052] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0053] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0054] In existing technologies, asynchronous remote replication storage volume pairs often encounter accidents such as network outages, synchronization service crashes, or unexpected power outages during synchronization. These accidents cause the synchronization process of the asynchronous remote replication storage volume pairs to be abnormally interrupted, directly affecting synchronization. Furthermore, data synchronization after abnormal interruption is prone to errors, making data synchronization recovery difficult.

[0055] Therefore, this application discloses a remote synchronization method for stored data, see [link to relevant documentation]. Figure 1 The flowchart of a remote synchronization method for storing data disclosed in this application is as follows: Figure 1 As shown, it includes:

[0056] S101: Receive synchronization command;

[0057] This step aims to receive synchronization commands, which can originate from manual operation or be issued by a synchronization program pre-installed in the storage system or storage device. For example, during a pre-defined periodic synchronization process, synchronization commands can be generated periodically to synchronize stored data.

[0058] There are no restrictions on the data content included in the synchronization command. It can include the IDs of the two parties that need to be synchronized, such as the storage volume ID, or the data content that needs to be synchronized, such as synchronizing all data for a certain day or all incremental data.

[0059] S102: Determine the remote copy storage relationship pair corresponding to the synchronization instruction;

[0060] This step involves identifying the remote replication storage pair, i.e., the two parties that need to perform data synchronization. This can be a synchronization relationship between storage pools, between storage volumes, or between storage volumes. In other words, any two parties performing data synchronization can be considered as a remote replication storage pair in this step.

[0061] Furthermore, the remote replication storage relationship can be considered as achieving data synchronization by performing synchronous or asynchronous replication, and it is not necessary to perform synchronous replication.

[0062] S103: Determine the state machine for the remote copy storage relationship pair;

[0063] This step involves determining the state machine for the remote replication storage pair. It's important to note that this state machine corresponds to the entire remote replication storage pair; each storage pair has its own state machine to indicate the data synchronization status between them. The specific type of state machine is not limited here. Those skilled in the art can configure the state machines according to actual needs, including but not limited to setting state machines for "state not found," "synchronization complete," "remote connection lost," "waiting for full synchronization," "waiting for incremental synchronization," "synchronizing," "invalid match," and "peer error," etc. It's easy to understand that the more types of state machines there are, the more they can encompass the various states and abnormal situations that may occur during data synchronization of the remote replication storage pair, thus facilitating timely handling by the user.

[0064] It is also important to note that the state machine is used to provide feedback on the data synchronization status of the remote replication storage pair. It can be set as an attribute of the remote replication storage pair in the storage system. This state machine can be configured at both ends of the remote replication storage pair, or it can be set at only one end. Preferably, the state machine can be set at the synchronization end. The synchronization end refers to the storage end where data changes occur, used to synchronize its own data based on the data on the synchronized end, including but not limited to data addition, data deletion, and data modification processes.

[0065] It is easy to understand that after a remote replication storage pair is created, an initial state machine can be assigned to the remote replication storage pair. Typically, the initial state machine is waiting for synchronization.

[0066] S104: If the state machine is waiting for synchronization, when the synchronization time condition is met, the data synchronization of the remote copy storage relationship pair is performed.

[0067] If the state machine is in a state of waiting for synchronization, data synchronization of the remote replicated storage pairs can be performed once the synchronization time condition is met. The synchronization time condition is not limited here; it is used to restrict the synchronization time. Since the number of remote replicated storage pairs undergoing synchronization is usually large, to ensure stable data synchronization, the order of the remote replicated storage pairs can be set, such as according to the creation order. If data synchronization of remote replicated storage pairs is performed periodically, then data synchronization is typically performed once in each period. If an exception occurs during data synchronization, data synchronization can be re-executed in the current period according to the exception type, or the data synchronization of the exception remote replicated storage pairs can be delayed until the next period.

[0068] In one feasible implementation, when performing this step, the waiting synchronization state machine can be divided into two types: waiting for incremental synchronization and waiting for full synchronization. If the state machine is waiting for incremental synchronization, incremental data synchronization of the remote replicated storage relationship pair is performed; if the state machine is waiting for full synchronization, full data synchronization of the remote replicated storage relationship pair is performed. Incremental data synchronization only synchronizes incremental data, which refers to data that has changed, while full data synchronization requires the entire data to be replicated regardless of whether it has changed.

[0069] This application embodiment constructs a state machine for data synchronization between remotely replicated storage pairs. During data synchronization, the state machine is used to provide feedback on the synchronization process, and can also provide feedback on abnormal states when synchronization fails, so as to recover from synchronization failures as soon as possible. This effectively improves the synchronization stability and fault tolerance between storage systems.

[0070] Based on the above embodiments, as a preferred embodiment, the following describes how to perform data synchronization:

[0071] When performing data synchronization, the remote replication storage relationship pair can be added to the processing queue. In each synchronization cycle, data synchronization is performed once according to the creation time of the remote replication storage relationship pair. When performing data synchronization, the state machine changes from waiting to synchronize to synchronizing.

[0072] The processing queue contains several remote replication storage pairs that require data synchronization. This queue is used to periodically synchronize these pairs. During this periodic synchronization process, the state machine of each remote replication storage pair changes from "synchronizing" to "synchronization complete" after synchronization is completed within each cycle. If an anomaly causes synchronization failure, the state machine of the remote replication storage pair can be set to an invalid match. This invalid match requires the same setting for the storage volume or storage pool contained in the remote replication storage pair. In the next cycle, if a remote replication storage pair with a "synchronization complete" state machine is detected, it indicates that data synchronization was successfully completed in the previous cycle. For remote replication storage pairs with an invalid match state machine, manual operation by the user or automatic repair based on the settings for the remote replication storage pair can be performed in the next cycle to restore data synchronization.

[0073] See also Figure 2 , Figure 2 This is a flowchart of another remote data synchronization method disclosed in an embodiment of this application. The complete implementation process of the embodiment corresponding to this step is as follows:

[0074] S201: Receive synchronization command;

[0075] S202: Determine the remote copy storage relationship pair corresponding to the synchronization instruction;

[0076] S203: Determine the state machine for the remote replication storage relationship pair;

[0077] S204: If the state machine is waiting for synchronization, when the synchronization time condition is met, add the remote copy storage relationship pair to the processing queue;

[0078] S205: In each synchronization cycle, data synchronization is performed once according to the creation time of the remote replication storage relationship pair. During data synchronization, the state machine is changed from waiting for synchronization to synchronizing.

[0079] More preferably, during step S205, if the state machine of the remote replication storage pair is in the state of synchronization, it indicates that the data synchronization of the previous cycle was not completed, or that data synchronization was completed but the state machine was not updated. In this case, the state machine of the remote replication storage pair can be changed to wait for incremental synchronization, and the system can check whether there are any abnormalities in the remote replication storage pair. If there are no abnormalities in the remote replication storage pair, the state machine is changed from waiting for incremental synchronization to synchronizing, and data synchronization of the remote replication storage pair is performed. If there are abnormalities in the remote replication storage pair, the abnormality is uploaded so that the user can handle it in a timely manner.

[0080] This embodiment aims to use a processing queue to periodically synchronize data of remotely replicated storage pairs, thereby ensuring the stability of data synchronization during periodic execution.

[0081] The following section describes other different state machines for remote replication storage pairs:

[0082] Based on the above embodiments, as a preferred embodiment, before performing data synchronization of the remote replication storage pair, the presence status of the storage units on both sides of the remote replication storage pair can be detected. If one storage unit is not present, the state machine is changed to "peer-end exception". "Peer-end exception" refers to a situation where one end of the remote replication storage pair is abnormal, preventing data synchronization from being performed. In this case, the state machine is set to "peer-end exception". This "peer-end exception" does not refer to any single end, but rather means that when one end is abnormal, the other end will indicate that the current state machine of the remote replication storage pair is "peer-end exception".

[0083] Based on the above embodiments, as a preferred embodiment, if the state machine of the remote replication storage relationship is detected to be remotely disconnected, the following steps may also be included:

[0084] Step 1: Change the state machine of the remote replication storage pair from "disconnected at the remote end" to "waiting for incremental synchronization"; if the remote replication storage pair has an automatic recovery parameter setting, proceed to Step 2; if the remote replication storage pair does not have an automatic recovery parameter setting, proceed to Step 3.

[0085] The second step is to change the state machine to be synchronizing according to the automatic recovery parameter settings, and to perform data synchronization of the remote copy storage relationship pair.

[0086] The third step is to keep the state machine of the remote replication storage relationship in a state of synchronization.

[0087] When the state machine is remotely disconnected, it is actually a state machine that represents an exception that occurred during data synchronization. To distinguish it from the invalid match state machine mentioned above, it can be applied to the state machine that represents an exception that occurred during incremental synchronization. In this case, the invalid match state machine represents the state machine that represents an exception that occurred during full synchronization, thus distinguishing between exceptions that occur during full synchronization and incremental synchronization.

[0088] Upon detecting a remote disconnection in the state machine, different execution steps are employed depending on the presence of automatic recovery parameter settings. The automatic recovery parameter settings are not specifically limited here; they are used for automatic recovery operations when incremental synchronization fails. Therefore, any operation settings applicable to automatic recovery when incremental synchronization fails can be considered as automatic recovery parameter settings, which may include, but are not limited to, settings for data synchronization time, synchronization method, and other options or parameters. It is readily understood that these automatic recovery parameter settings can be set by those skilled in the art.

[0089] This embodiment aims to repair the data synchronization process using automatic recovery parameters when a remote disconnection occurs, thereby achieving automatic repair of the data synchronization process and ensuring the stability of the data process.

[0090] Based on the above embodiments, as a preferred embodiment, if a recovery command is detected, the state machine of each remote copy storage pair corresponding to the recovery command is obtained, and a recovery operation is performed on the remote copy storage pairs that are in the waiting incremental synchronization state or remotely disconnected.

[0091] When a user performs a recovery operation, remote replicated storage pairs with state machines that are either nonexistent, awaiting full synchronization, experiencing peer errors, or having invalid matches cannot be recovered. Remote replicated storage pairs with other state machine types will be set to await incremental synchronization, and subsequent operations will be performed by the asynchronous remote service or the user.

[0092] The following description uses a specific application of this application as an example:

[0093] 1. After the remote replication storage relationship is created, the status of both the local and remote volumes is set to "Waiting for Full Synchronization". If "Immediate Full Synchronization" was specified during creation, the immediate full synchronization operation will be performed. The background task will set its status to "Synchronizing" and perform a full synchronization of the volume. After successful synchronization, the status will be set to "Synchronization Completed". If synchronization fails, the volume status will be set to "Invalid Match". If "Immediate Full Synchronization" was not specified during creation, the status will remain "Waiting for Full Synchronization", awaiting subsequent manual operation by the user.

[0094] 2. After a remote replication storage pair is created, the asynchronous remote service adds it to the maintenance queue and periodically executes synchronization tasks based on the synchronization period at the time of creation. When the synchronization time for the remote replication storage pair expires, its status changes from "synchronization complete" to "synchronizing," and incremental synchronization is performed. If synchronization is successful, the status is set to "synchronization complete"; if synchronization fails, the status is set to "remote disconnected." The remote replication storage pair then enters the next synchronization cycle.

[0095] 3. When the synchronization cycle arrives again, if the current status is "synchronization complete," then perform incremental synchronization as described in step 2 above. If the status is "remote disconnection," then set the status to "waiting for incremental synchronization." Next, process the data based on whether automatic recovery parameters were set when the user created the remote replication storage relationship. If no automatic recovery parameters were set, the status remains "waiting for incremental synchronization," awaiting user action. If automatic recovery parameters were set, then set the status to "synchronizing" and perform incremental synchronization. Subsequent operations are the same as in step 2.

[0096] See Figure 3 , Figure 3 This is a structural diagram of a remote data synchronization system disclosed in an embodiment of this application. The system includes:

[0097] The instruction receiving module is used to receive synchronization instructions;

[0098] The target determination module is used to determine the remote copy storage relationship pair corresponding to the synchronization instruction;

[0099] The state machine detection module is used to determine the state machine of the remote copy storage relationship pair;

[0100] The data synchronization module is used to perform data synchronization of the remote copy storage relationship pair when the synchronization time condition is met, if the state machine is waiting for synchronization.

[0101] Based on the above embodiments, as a preferred embodiment, it further includes:

[0102] The presence detection module is used to detect the presence status of storage units on both sides of the remote replication storage relationship; if one storage unit is not present, the state machine is changed to an abnormal state on the other side.

[0103] Based on the above embodiments, as a preferred embodiment, the data synchronization module includes:

[0104] The queue adding unit is used to add the remote replication storage relationship pair to the processing queue, and to perform data synchronization once in each synchronization cycle according to the creation time of the remote replication storage relationship pair;

[0105] The state machine change unit is used to change the state machine from waiting for synchronization to synchronizing during data synchronization.

[0106] Based on the above embodiments, as a preferred embodiment, it further includes:

[0107] An automatic recovery configuration module is used to change the state machine of the remote copy storage relationship pair from "remote disconnection" to "waiting for incremental synchronization" if the state machine is remotely disconnected.

[0108] If the remote replication storage pair has an automatic recovery parameter setting, the state machine is changed to be synchronizing according to the automatic recovery parameter setting, and data synchronization of the remote replication storage pair is performed.

[0109] If the remote replication storage pair does not have an automatic recovery parameter setting, the state machine of the remote replication storage pair remains in the state of synchronization.

[0110] Based on the above embodiments, as a preferred embodiment, it further includes:

[0111] An anomaly detection module is used to change the state machine of the remote replication storage relationship pair to wait for incremental synchronization and detect whether there is an anomaly in the remote replication storage relationship pair; if there is no anomaly in the remote replication storage relationship pair, the state machine is changed from waiting for incremental synchronization to synchronizing, and data synchronization of the remote replication storage relationship pair is performed.

[0112] If there is an anomaly in the remote copy storage relationship, upload the anomaly.

[0113] Based on the above embodiments, as a preferred embodiment, it further includes:

[0114] The recovery module is used to obtain the state machine of each remote replicated storage pair corresponding to the recovery command when a recovery command is detected; and to perform recovery operations on remote replicated storage pairs that are in the waiting incremental synchronization state or have been disconnected at the remote end.

[0115] This application also provides an electronic device, which can be a PC (Personal Computer), or a smartphone, tablet, PDA, portable computer, smart router, network storage device, or terminal device. This electronic device can be a node forming a CDN network or a blockchain network.

[0116] See Figure 4 The present application provides a structural diagram of an electronic device, such as... Figure 4 As shown, it may include a memory 11, a processor 12, and a bus 13.

[0117] The memory 11 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as the code of program A01, but also to temporarily store data that has been output or will be output.

[0118] In some embodiments, processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 11 or process data to implement method A provided in any of the above embodiments, such as executing program A 01.

[0119] This bus 13 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0120] Based on the above embodiments, as a preferred embodiment, see [link to preferred embodiment]. Figure 5 The electronic device further includes:

[0121] Input interface 14 is used to acquire externally imported computer programs, parameters, and instructions, which are then stored in memory 11 under the control of processor 12. This input interface 14 can be connected to an input device to receive parameters or instructions manually entered by the user. The input device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad mounted on the terminal casing, or a keyboard, touchpad, or mouse, etc.

[0122] Display unit 15 is used to display data processed by processor 12 and to display a visual user interface. Display unit 15 can be an LED display, liquid crystal display, touch-screen liquid crystal display, or OLED (Organic Light-Emitting Diode) touchscreen, etc.

[0123] Network port 16 is used for communication connections with external terminal devices. The communication technology used for this connection can be wired or wireless, such as Mobile High Definition Link (MHL), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), Wireless Fidelity (WiFi), Bluetooth, Bluetooth Low Energy, or IEEE 802.11s-based communication technology.

[0124] Figure 5 Only an electronic device with components 11-16 and program A01 is shown. Those skilled in the art will understand that... Figure 5 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0125] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0126] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0127] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0129] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0130] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0131] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0133] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method of remotely synchronizing storage of data, the method comprising: The method comprises: receiving a synchronization instruction; determining a remote replication storage relationship pair corresponding to the synchronization instruction; determining a state machine of the remote replication storage relationship pair; if the state machine is in a waiting synchronization state, performing data synchronization of the remote replication storage relationship pair when a synchronization time condition is met; if the state machine is in a waiting synchronization state, performing data synchronization of the remote replication storage relationship pair when a synchronization time condition is met, comprises: if the state machine is in a waiting incremental synchronization state, performing incremental data synchronization of the remote replication storage relationship pair; if the state machine is in a waiting full-amount synchronization state, performing full-amount data synchronization of the remote replication storage relationship pair; wherein performing data synchronization of the remote replication storage relationship pair comprises: adding the remote replication storage relationship pair to a processing queue, and performing data synchronization of the remote replication storage relationship pair in each synchronization period according to a creation time of the remote replication storage relationship pair; when performing data synchronization, changing the state machine from the waiting synchronization state to a synchronization in progress state; if an exception occurs during the performance of data synchronization, re-performing data synchronization in the current period or waiting for the next period to perform data synchronization of the exception remote replication storage relationship pair according to the type of the exception.

2. The method of remote synchronization of claim 1, wherein, Before performing data synchronization of the remote replication storage relationship pair, the method further comprises: detecting an on-site state of a storage unit of each of the remote replication storage relationship pair; if one of the storage units is not on site, changing the state machine to a peer exception state.

3. The method of remote synchronization of claim 1, wherein, if the state machine is in a remote disconnection state, the method further comprises: changing the state machine of the remote replication storage relationship pair from the remote disconnection state to a waiting incremental synchronization state; if an automatic recovery parameter setting exists for the remote replication storage relationship pair, changing the state machine to a synchronization in progress state according to the automatic recovery parameter setting and performing data synchronization of the remote replication storage relationship pair; if an automatic recovery parameter setting does not exist for the remote replication storage relationship pair, keeping the state machine of the remote replication storage relationship pair in the synchronization in progress state.

4. The method of remote synchronization of claim 3, wherein, if the state machine of the remote replication storage relationship pair is in the synchronization in progress state when performing data synchronization of the remote replication storage relationship pair in each synchronization period according to the creation time of the remote replication storage relationship pair, the method further comprises: changing the state machine of the remote replication storage relationship pair to a waiting incremental synchronization state, and detecting whether an exception exists for the remote replication storage relationship pair; if no exception exists for the remote replication storage relationship pair, changing the state machine from the waiting incremental synchronization state to the synchronization in progress state and performing data synchronization of the remote replication storage relationship pair; if an exception exists for the remote replication storage relationship pair, uploading the exception.

5. The remote synchronization method of claim 1 or 2, wherein, if a recovery instruction is detected, the method further comprises: obtaining respective state machines of remote replication storage relationship pairs corresponding to the recovery instruction; performing a recovery operation on the remote replication storage relationship pairs in a waiting incremental synchronization state or a remote disconnection state.

6. An electronic device, comprising: The electronic device comprises a memory and a processor, and the memory stores a remote synchronization program for storing data, which can be run on the processor. When the remote synchronization program is executed by the processor, the following functions are implemented: receiving a synchronization instruction; determining a remote replication storage relationship pair corresponding to the synchronization instruction; determining a state machine of the remote replication storage relationship pair; if the state machine is in a waiting synchronization state, performing data synchronization of the remote replication storage relationship pair when a synchronization time condition is met; if the state machine is in a waiting synchronization state, performing data synchronization of the remote replication storage relationship pair when a synchronization time condition is met includes: if the state machine is in a waiting incremental synchronization state, performing incremental data synchronization of the remote replication storage relationship pair; if the state machine is in a waiting full-amount synchronization state, performing full-amount data synchronization of the remote replication storage relationship pair; wherein performing data synchronization of the remote replication storage relationship pair includes: adding the remote replication storage relationship pair to a processing queue, and performing data synchronization of the remote replication storage relationship pair in each synchronization period according to a creation time of the remote replication storage relationship pair; if an exception occurs during the execution of data synchronization, re-executing data synchronization of the remote replication storage relationship pair in the current period or waiting for the next period to execute data synchronization of the remote replication storage relationship pair again according to an exception type. comprises:

7. A system for remotely synchronizing storage of data, the system comprising: an instruction receiving module configured to receive a synchronization instruction; a target determining module configured to determine a remote replication storage relationship pair corresponding to the synchronization instruction; a state machine detecting module configured to determine a state machine of the remote replication storage relationship pair; a data synchronization module configured to, if the state machine is in a waiting synchronization state, perform data synchronization of the remote replication storage relationship pair when a synchronization time condition is met; wherein if the state machine is in a waiting synchronization state, performing data synchronization of the remote replication storage relationship pair when a synchronization time condition is met includes: if the state machine is in a waiting incremental synchronization state, performing incremental data synchronization of the remote replication storage relationship pair; if the state machine is in a waiting full-amount synchronization state, performing full-amount data synchronization of the remote replication storage relationship pair; wherein performing data synchronization of the remote replication storage relationship pair includes: adding the remote replication storage relationship pair to a processing queue, and performing data synchronization of the remote replication storage relationship pair in each synchronization period according to a creation time of the remote replication storage relationship pair; changing the state machine from a waiting synchronization state to an executing synchronization state when data synchronization is performed; if an exception occurs during the execution of data synchronization, re-executing data synchronization of the remote replication storage relationship pair in the current period or waiting for the next period to execute data synchronization of the remote replication storage relationship pair again according to an exception type. The computer readable storage medium stores a remote synchronization program of storage data, and the remote synchronization program, when executed by a processor, implements the steps of the remote synchronization method of storage data according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Synchronous remote replication method and system for distributed block storage system

    CN111770136A