WO2014100978A1 - 一种数据备份方法、装置和系统 - Google Patents

一种数据备份方法、装置和系统 Download PDF

Info

Publication number
WO2014100978A1
WO2014100978A1 PCT/CN2012/087435 CN2012087435W WO2014100978A1 WO 2014100978 A1 WO2014100978 A1 WO 2014100978A1 CN 2012087435 W CN2012087435 W CN 2012087435W WO 2014100978 A1 WO2014100978 A1 WO 2014100978A1
Authority
WO
WIPO (PCT)
Prior art keywords
backup
data
target
candidate
transmission
Prior art date
Application number
PCT/CN2012/087435
Other languages
English (en)
French (fr)
Inventor
欧雄兵
祈银红
张秦
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201280003654.9A priority Critical patent/CN104137512B/zh
Priority to CN201710214828.0A priority patent/CN107247638B/zh
Priority to PCT/CN2012/087435 priority patent/WO2014100978A1/zh
Publication of WO2014100978A1 publication Critical patent/WO2014100978A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Definitions

  • the present invention relates to the field of data storage technologies, and in particular, to a data backup method, apparatus, and system.
  • Cloud storage is an emerging method of data storage. Data is transmitted over a network and stored in a data center (DC, Data Center) provided by a service provider. Then, users access the data through network access.
  • DC Data Center
  • the service provider performs backup processing on the stored data in order to ensure the durability of the stored data.
  • the data center of the cloud storage system includes: a primary DC, a synchronous backup DC, and an asynchronous backup DC.
  • the primary DC is used for data communication with the user, and the original of the data is stored, and the synchronous backup DC is used for synchronous storage.
  • a copy, asynchronous backup DC is used to save a copy asynchronously. The number of copies is determined based on the Service Level Agreement (SLA) signed by the user and the service provider.
  • SLA Service Level Agreement
  • the primary DC synchronizes the number of copies of the backup according to the requirements, and selects the corresponding number of synchronous backup DCs with the highest priority to save the copies synchronously. Synchronous backup After the DC saves the copy, it sends a backup success message to the primary DC. If the primary DC successfully saves the original at this time, the primary DC sends an upload success message to the user. Asynchronous backups are performed in the background as asynchronous tasks.
  • the data is successfully uploaded only after being successfully saved in both the primary DC and the synchronous backup DC.
  • the primary DC can only select a synchronous backup DC with a higher priority for synchronous backup.
  • the data may not be synchronized to the synchronous backup DC, or it may take a long time to synchronize the backup to the synchronous backup DC. This situation causes the user to fail to upload data, or feels that the upload speed is slow, which affects the storage efficiency of the cloud storage system.
  • an embodiment of the present invention provides a data backup method, apparatus, and system for dynamically selecting a synchronous backup DC for synchronous backup of data.
  • the network quality between the primary DC and the target backup DC in the cloud storage system can be ensured, the success rate of uploading data by the user is improved, and the efficiency of the cloud storage system can be improved.
  • a first aspect of the present invention provides a data backup method, including:
  • the data is sent to the target backup DC such that the target backup DC saves a copy of the data.
  • the method further includes:
  • the transmission status information table is maintained according to the transmission status, where the transmission status information table includes: a device name, a transmission bandwidth, a transmission delay, a transmission bandwidth priority, and a transmission delay priority of the candidate backup DC.
  • the method further includes:
  • the capacity of the data is greater than the first threshold or the data type is the first type, determining that the data is the first type of data, when the capacity of the data is less than the first threshold or its data type When it is of the second type, it is determined that the data is the second type of data.
  • the expected number of copies N is equal to the number of expected synchronous backup copies Ni plus the expected number of asynchronous backup copies N 2
  • the target backup The DC includes a target synchronous backup DC and a target asynchronous backup DC.
  • the N candidate backup DCs with the highest transmission bandwidth priority are selected as the target backup DC from the transmission state information table, and the transmission bandwidth priority of the target synchronous backup DC is higher than that of the target The transmission bandwidth priority of the target asynchronous backup DC;
  • the N candidate backup DCs with the highest transmission delay priority are selected as the target backup DC from the transmission state information table, and the transmission delay of the target synchronous backup DC has a high priority.
  • the number of the target synchronous backup DCs is the number of the target asynchronous backup DCs. Is N 2 .
  • a second aspect of the present invention provides a data backup apparatus, including:
  • the data is sent to the target backup DC such that the target backup DC saves a copy of the data.
  • the data backup device further includes:
  • a maintenance unit configured to maintain a transmission state information table according to the transmission state, where the transmission state information table includes: a device name, a transmission bandwidth, a transmission delay, a transmission bandwidth priority, and a transmission delay priority of the candidate backup DC .
  • the data backup device further includes:
  • a determining unit configured to: when the capacity of the data is greater than the first threshold or the data type is the first type, determine that the data is the first type of data, and further, when the capacity of the data is smaller than the first When a threshold value or a data type thereof is the second type, the data is determined to be the second type of data.
  • the expected number of copies N is equal to the number of expected synchronous backup copies Ni plus the expected number of asynchronous backup copies N 2
  • the target backup The DC includes a target synchronous backup DC and a target asynchronous backup DC.
  • the selecting unit specifically includes:
  • a first selection sub-unit configured to: when the data is the first type of data, select, from the transmission state information table, N candidate backup DCs with the highest transmission bandwidth priority as the target backup DC, the target synchronous backup DC
  • the transmission bandwidth priority is higher than the transmission bandwidth priority of the target asynchronous backup DC
  • the candidate backup DCs are used as the target backup DCs, and the transmission delay priority of the target synchronous backup DC is higher than the transmission delay priority of the target asynchronous backup DCs;
  • the number of the target synchronous backup DCs is, and the number of the target asynchronous backup DCs is N 2 .
  • the embodiments of the present invention have the following advantages:
  • the network quality between the primary DC and each candidate backup DC can be grasped.
  • the appropriate data is selected according to the data, the transmission status, and the expected number of copies N sent by the user.
  • the candidate backup DC serves as the target backup DC and sends data to it.
  • the backup process is based on network quality, so it can maximize the speed and success rate of users uploading data, and effectively improve the efficiency of the cloud storage system.
  • FIG. 1 is a flowchart of a data backup method according to a first embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a cloud storage system according to the present invention.
  • FIG. 3 is a flowchart of a data backup method according to a second embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a detection sequence of the present invention.
  • Figure 5 is a schematic diagram of another detection sequence of the present invention.
  • FIG. 6 is a structural diagram of a data backup device according to a third embodiment of the present invention.
  • FIG. 7 is a structural diagram of a data backup device according to a fourth embodiment of the present invention.
  • FIG. 8 is a structural diagram of a data backup system according to a fifth embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a network device provided by the present invention.
  • the embodiment of the invention provides a data backup method for dynamically selecting a synchronous backup DC for synchronous backup of data.
  • the network quality between the primary DC and the target backup DC in the cloud storage system can be ensured, the success rate of uploading data by the user can be improved, and the efficiency of the cloud storage system can be improved.
  • the embodiments of the present invention also provide an apparatus and system related to the data backup method, which will be separately described below.
  • FIG. 1 A first embodiment of the present invention will be described in detail with respect to a data backup method.
  • FIG. 1 For the specific process of the data backup method to be described in this embodiment, refer to FIG. 1 , including the steps:
  • FIG. 2 the structure of the cloud storage system is shown in FIG. 2, which includes a primary DC 201 and at least one candidate backup DC 202.
  • the primary DC 201 is respectively connected to each candidate backup DC 202, which is indicated by a broken line in the figure.
  • the transmission status between the primary DC 201 and each candidate backup DC 202 is first detected.
  • the content of the transmission state includes at least the transmission bandwidth and the transmission delay between the primary DC 201 and each candidate backup DC 202.
  • the transmission bandwidth and the transmission delay can directly reflect the network quality between the primary DC 201 and the candidate backup DC 202.
  • the expected number of copies N is the number of copies determined according to the SLA. Under the cloud storage system architecture, one copy can only be saved in one backup DC.
  • the primary DC 201 selects a target backup DC 204 that meets a preset condition from the candidate backup DC 202 according to the data uploaded by the user 203, the transmission status between the primary DC 201 and each candidate backup DC 202, and the expected number N of copies of the user 203.
  • the number of target backup DCs 204 is the same as the number of expected copies N.
  • the setting of the preset condition is related to the transmission bandwidth and the transmission delay, which will be described in the subsequent embodiments.
  • the network quality between the primary DC and each candidate backup DC is grasped, and according to the data, transmission status, and expected copy sent by the user when the backup is performed.
  • Number N selects the appropriate candidate backup DC as the target backup DC and sends data to it.
  • the backup process is based on network quality, so it can maximize the speed and success rate of users uploading data, and effectively improve the efficiency of the cloud storage system.
  • the transmission status between the primary DC 201 and each candidate backup DC 202 is detected.
  • the content of the transmission state includes at least the transmission bandwidth and the transmission delay between the primary DC 201 and each candidate backup DC 202.
  • the transmission bandwidth and the transmission delay can directly reflect the network quality between the primary DC 201 and the candidate backup DC 202.
  • the detecting task may specifically include but is not limited to the following two types:
  • the first, primary DC maintains an independent background task.
  • the first data of the first standard capacity is used for transmission and detection, and the first data is generally big data
  • the second data of the second standard capacity is transmitted and detected when the transmission delay is detected, and the second data is detected.
  • the detection may be performed multiple times and averaged according to a preset number of detections, and the number of detections is for each candidate backup DC.
  • the second DC uses the normal upload task of the corresponding number of times as the detection task according to the preset number of detections.
  • the primary DC first determines the size of the data in the upload task.
  • One method is to set a threshold value for distinguishing the data size. If the threshold value is greater than the threshold value, the smaller data is smaller data, and the big data is used for detecting. Transmission bandwidth, small data is used to detect transmission delay, and detection transmission delay can also directly use the ping command. Judging the size of the data can also be based on the content type of the data, for example, the video stream data is big data, and the text data is small data.
  • the actual detecting operation is: detecting an average transmission state between the primary DC and the candidate backup DC according to the preset number of detections.
  • the detection order may include but is not limited to the following two types:
  • the first type uses one data at a time to detect all candidate backup DCs.
  • the cloud storage system includes a primary DC, a first backup DC, and a second backup DC.
  • the number of detections is three.
  • the data used for detection is URL1, URL2, and URL3, and the data transmission interface is HTTP.
  • the upload mode is HTTP/Put
  • the response method is HTTP/Response.
  • the primary DC sends URL1 to the first backup DC and the second backup DC, respectively, and then receives the response.
  • the primary DC sends URL2 to the first backup DC and the second backup DC, respectively, and then receives the response.
  • the primary DC sends URL3 to the first backup DC and the second backup DC, respectively, and then receives the response.
  • the average value of the transmission state of the response is finally calculated.
  • all candidate backup DCs are detected one by one according to the preset number of detections.
  • the cloud storage system includes a primary DC, a first backup DC, and a second backup DC.
  • the number of detections is three.
  • the data used for detection is URL1, URL2, and URL3, and the data transmission interface is HTTP.
  • the upload mode is HTTP/Put
  • the response method is HTTP/Response.
  • the primary DC sequentially sends URL1, URL2, and URL3 to the first backup DC, and receives the corresponding three responses. Then, the primary DC sends URL1, URL2, and then to the second backup DC.
  • each candidate backup DC 202 after detecting the transmission state of each candidate backup DC 202, the transmission state information table is maintained according to the transmission state, and the specific operation mode is to refresh the transmission bandwidth and the average value of the transmission delay, and according to the detection.
  • each candidate backup DC 202 is given a transmission bandwidth priority and a transmission delay priority.
  • the candidate backup DC with the largest transmission bandwidth has a transmission bandwidth priority of 1, followed by 2, and so on.
  • the transmission status information table includes: a device name, a transmission bandwidth, a transmission delay, a transmission bandwidth priority, and a transmission delay priority of the candidate backup DC.
  • the transmission status information table may further include a set value of the number of detections described in step 301, where the number of detections is used to indicate the number of times detected when detecting the average transmission status between the primary DC and the candidate backup DC.
  • the data capacity is used as a flag to distinguish the size of the data.
  • the data is determined to be the first type of data.
  • the data is determined to be the second type of data.
  • the first threshold value is 1 MB
  • the first type of data is big data
  • the second type of data is For small data.
  • the Content-Length header field in the HTTP request message can be used to obtain the capacity of the data, and then the judgment is distinguished.
  • the step can be further replaced by: when the data type of the data sent by the user is the first type, determining that the data is the first type of data, and when the data type of the data is the second type, determining that the data is the second type. Class data.
  • the first type may be a multimedia type
  • the second type is a text type
  • the first type of data is big data
  • the second type of data is small data.
  • the extension of the data file can be sniffed to determine the data type.
  • an important backup principle is that a candidate backup DC with a large transmission bandwidth is used for saving big data, and a candidate backup DC with a small transmission delay is preferably saved for small data.
  • the expected number of copies N is equal to the number of expected synchronous backup copies plus the number of expected asynchronous backup copies ⁇ 2
  • the target backup DC includes the target synchronous backup DC and the target asynchronous backup DC.
  • the data is the first type of data
  • the transmission bandwidth priority, the number of target synchronous backup DCs is N L 5
  • the number of candidate backup DCs is ⁇ ( ⁇ > ⁇ ), and select one candidate backup DC with a transmission bandwidth priority of 1 ⁇ as the target backup DC from the transmission status information table, where the N target backup DCs
  • the target backup DC with the highest transmission bandwidth priority is used as the target synchronous backup DC, and the remaining N 2 target backup DCs are used as the target asynchronous backup DC.
  • the data is the second type of data
  • the transmission delay priority of the backup DC the number of target synchronous backup DCs is N L 5
  • the number of candidate backup DCs is ⁇ ( ⁇ > ⁇ ), and select one candidate backup DC whose transmission delay priority is 1 ⁇ from the transmission status information table as the target backup DC, where the N target backup DCs
  • the target backup DC with the highest transmission delay priority is used as the target synchronous backup DC, and the remaining N 2 target backup DCs are used as the target asynchronous backup DC.
  • the target backup DC may only include the target synchronous backup DC
  • the candidate backup DC may include only the candidate synchronous backup DC.
  • Step 304 may be replaced by: if the data is the first type of data, select N candidate synchronous backup DCs with the highest transmission bandwidth priority as the target synchronous backup DC from the transmission status information table.
  • Step 305 can be replaced by: if the data is the second type of data, the N candidate synchronous backup DCs with the highest transmission delay priority are selected from the transmission state information table as the target synchronous backup DC.
  • the target backup DC may only include the target asynchronous backup DC
  • the candidate backup DC may include only the candidate asynchronous backup DC.
  • Step 304 may be replaced by: if the data is the first type of data, the N candidate asynchronous backup DCs with the highest transmission bandwidth priority are selected from the transmission status information table as the target asynchronous backup DC. Then, step 305 can be replaced by: if the data is the second type of data, the N candidate asynchronous backup DCs with the highest transmission delay priority are selected from the transmission status information table as the target asynchronous backup DC.
  • the target backup DC sends data to the target backup DC, so that the target backup DC saves a copy of the data.
  • the data is sent to the target backup DC 204, which is indicated by a solid line in the figure, so that the target backup DC 204 saves a copy of the data, and at the same time, the main DC 301 also saves the original of the data.
  • the real-time transmission status between the primary DC and the target backup DC is also detected.
  • the primary DC After the target synchronous backup DC and the primary DC successfully save the data sent by the user, the primary DC will receive the backup success message sent by the target synchronous backup DC. At this time, the primary DC sends an upload success message to the user. In an asynchronous backup task, the primary DC receives the backup success message sent by the target asynchronous backup DC.
  • the user and the main DC can use the HTTP interface for the communication connection, and the NFS (Network File System) or the CIFS (Common Internet File System) interface can be used, which is not specifically limited herein.
  • NFS Network File System
  • CIFS Common Internet File System
  • the real-time transmission state between the primary DC and each candidate backup DC changes at a time. Therefore, an update mechanism for detecting the transmission state must be set.
  • setting a preset The period begins to detect the transmission state between the primary DC and each candidate backup DC at the initial moment of the period, and then the detection value is valid in the period, but the validity of the detection value also continues to age over time, so the next preset
  • the transmission status is re-detected to ensure the validity of the detected transmission status.
  • the preset period is set to 300 seconds.
  • the preset period described in this step may also be described in the transmission status information table.
  • the transmission status information table see Table 2 below.
  • the parameters in this table are all examples and do not have any limit.
  • the update mechanism is also capable of designing based on the transmission status.
  • the real-time transmission status between the primary DC and the target backup DC may also be detected. This type of detection is ubiquitous in the data transmission process and will not be described here.
  • the transmission bandwidth of the target backup DC may be reduced by 20%, or the transmission delay may be increased by 20%.
  • the triggering execution detects the transmission status between the primary DC and the candidate backup DC.
  • the transmission bandwidth and the transmission delay between the primary DC and the candidate backup DC are periodically detected, and the network quality between the primary DC and each candidate backup DC is grasped in real time, and these transmission states are maintained in the transmission state information table. information.
  • the appropriate candidate backup DC is selected as the target backup DC according to the size of the data, the transmission status of the candidate backup DC, and the expected number of copies, and then the data is sent and backed up.
  • the backup process is based on network quality, so it can maximize the speed and success rate of data uploading by users, and effectively improve the efficiency of cloud storage systems.
  • a third embodiment of the present invention will be described in detail with respect to a data backup apparatus.
  • the data backup apparatus of this embodiment includes one or more units for implementing one or more steps of the foregoing method. Therefore, the description of each step in the foregoing method is applicable to the corresponding unit in the data backup device.
  • FIG. 6 For the specific structure of the data backup device described in this embodiment, refer to FIG. 6, including:
  • the selecting unit 602 and the backup unit 603 are all capable of performing communication connection with at least one candidate backup DC 62.
  • the data backup device can be loaded on the main DC 60 as a separate module.
  • the first detecting unit 601 is configured to detect a transmission state between the primary DC 60 and the candidate backup DC 62. Before the user 61 uploads data to the main DC 60, the first detecting unit 601 first detects the transmission status between the primary DC 60 and each candidate backup DC 62.
  • the content of the transmission state includes at least the transmission bandwidth and the transmission delay between the primary DC 60 and each candidate backup DC 62. The transmission bandwidth and the transmission delay can directly reflect the network quality between the primary DC 60 and the candidate backup DC 62.
  • the selecting unit 602 is configured to select, from the candidate backup DC 62, the target backup DC that meets the preset condition according to the data sent by the user, the transmission status, and the expected number of copies N.
  • the data in this embodiment refers to the data uploaded by the user 61 to the primary DC 60.
  • the expected number of copies N is the number of copies determined according to the SLA. In the cloud storage system architecture, one copy can only be saved in one backup. In the DC.
  • the selecting unit 602 selects a target backup DC that meets a preset condition from the at least one candidate backup DC 62 according to the data uploaded by the user 61, the transmission status between the primary DC 60 and each candidate backup DC 62, and the expected number N of copies of the user 61.
  • the number of backup DCs is the same as the number of expected copies N.
  • the setting of the preset condition is related to the transmission bandwidth and the transmission delay, which will be explained in the subsequent embodiments.
  • the backup unit 603 is configured to send data to the target backup DC, so that the target backup DC saves a copy of the data.
  • the backup unit 603 After the selection unit 602 determines the target backup DC, the backup unit 603 sends data to the target backup DC, so that the target backup DC saves a copy of the data, and at the same time, the storage unit in the primary DC 60 also saves the original of the data.
  • the detecting unit 601 checks the network quality between the primary DC 60 and each candidate backup DC 62 by detecting the transmission state between the primary DC 60 and the candidate backup DC 62.
  • the selecting unit 602 is configured according to the data sent by the user.
  • the transmission status and the expected number of copies N select an appropriate candidate backup DC as the target backup DC, and the backup unit 603 then sends data to the target backup DC and backs up.
  • the backup process is based on network quality, so it can maximize the speed and success rate of uploading data by users 61, and effectively improve the efficiency of cloud storage systems.
  • the fourth embodiment of the present invention will supplement the description of the data backup device according to the third embodiment.
  • the data backup device described in the embodiments includes one or more units for implementing one or more steps of the foregoing method. Therefore, the description of each step in the foregoing method is applicable to the corresponding unit in the data backup device.
  • the first detecting unit 701 is in communication with the maintenance unit 702, the maintenance unit 702 is in communication with the determining unit 703, the determining unit 703 is in communication with the selecting unit 704, and the selecting unit 704 is in communication with the backup unit 705.
  • the selecting unit 704 and the backup unit are selected.
  • the 705 is in communication with the candidate backup DC 72, the backup unit 705 is also in communication with the second detection unit 707, the second detection unit 707 is in communication with the second trigger unit 708, and the first trigger unit 706 and the second trigger unit 708 are respectively
  • a detecting unit 701 is communicatively connected.
  • the first detecting unit 701 specifically includes: a detecting subunit 7011.
  • the selecting unit 704 specifically includes: a first selecting subunit 7041, a second selecting subunit 7042, and a third selecting subunit 7043.
  • the first detecting unit 701 detects a transmission state between the primary data center DC70 and the candidate backup DC 72.
  • the content of the transmission state includes at least the transmission bandwidth and the transmission delay between the primary DC 70 and each candidate backup DC 72.
  • the transmission bandwidth and the transmission delay can directly reflect the network quality between the primary DC 70 and the candidate backup DC 72.
  • the detecting task may specifically include but is not limited to the following two types:
  • the first, primary DC maintains an independent background task.
  • the second DC uses the normal upload task of the corresponding number as the check 'j task according to the preset number of detections.
  • the first detecting unit 701 specifically includes:
  • the detecting subunit 7011 is configured to detect an average transmission state between the primary DC 70 and the candidate backup DC 72 according to the preset detection times.
  • the detection order may include but is not limited to the following two types:
  • the first type uses one data at a time to detect all candidate backup DCs.
  • the first type uses one data at a time to detect all candidate backup DCs.
  • the maintenance unit 702 is configured to maintain a transmission status information table according to the transmission status detected by the first detecting unit 701.
  • the maintenance unit 702 After the first detecting unit 701 detects the transmission state of each candidate backup DC 72, the maintenance unit 702 maintains the transmission state information table according to the transmission state, and the specific execution manner is to refresh the transmission bandwidth and the average value of the transmission delay in the table, and according to the present
  • the secondary detection result assigns a transmission bandwidth priority and a transmission delay priority to each candidate backup DC 72. For example, the candidate backup DC with the largest transmission bandwidth has a transmission bandwidth priority of 1, followed by 2, and so on.
  • the transmission status information table includes: a device name, a transmission bandwidth, a transmission delay, a transmission bandwidth priority, and a transmission delay priority of the candidate backup DC.
  • the transmission state information table may further include a set value of the number of times of detection by the first detecting unit 701, where the number of times of detecting is used to indicate that the first detecting unit 701 detects the average transmission state between the primary DC 70 and the candidate backup DC 72. frequency.
  • the determining unit 703 is configured to: when the capacity of the data sent by the user is greater than the first threshold, determine that the data is the first type of data, and further, when the capacity of the data is less than the first threshold, determine the data as The second type of data.
  • the data capacity is used as a flag for distinguishing the size of the data.
  • the first threshold value is 1 MB
  • the first type of data is big data
  • the second type of data is small data.
  • the Content-Length header field in the HTTP request message can be used to obtain the capacity of the data, and then the judgment is made.
  • the determining unit 703 is further configured to: when the data type of the data sent by the user is the first type, determine that the data is the first type of data, and further, when the data type of the data is the second type, determine the The data is the second type of data.
  • the first type may be a multimedia type
  • the second type is a text type
  • the first type of data is big data
  • the second type of data is small data.
  • the extension of the data file can be sniffed to determine the data type.
  • an important principle is that a candidate backup DC with a large transmission bandwidth is preferably used for storing big data, and a candidate backup DC with a small transmission delay is preferably saved for small data.
  • the selecting unit 704 is configured to select, from the candidate backup DC72, the target backup DC that meets the preset condition according to the data sent by the user, the transmission status, and the expected number of copies.
  • the selecting unit 704 specifically includes: a first selecting subunit 7041, a second selecting subunit 7042, and a third selecting subunit 7043. The three can only select one execution operation at a time.
  • the first selection subunit 7041 is configured to: if the data is the first type of data, select, from the transmission state information table, N candidate backup DCs with the highest transmission bandwidth priority as the target backup DC, and the transmission bandwidth of the target synchronous backup DC takes precedence.
  • the level is higher than the transmission bandwidth priority of the target asynchronous backup DC, and the number of target synchronous backup DCs is N L
  • the first selection subunit 7041 is further configured to: if the data is the second type of data, select, from the transmission state information table, the candidate backup DCs with the highest transmission delay priority as the target backup DC, and the transmission of the target synchronous backup DC
  • the delay priority is higher than the transmission delay priority of the target asynchronous backup DC, and the number of target synchronous backup DCs is N l and the number of target asynchronous backup DCs is N 2 .
  • the expected number of copies N is equal to the number of expected synchronous backup copies plus the number of expected asynchronous backup copies N 2
  • the target backup DC includes the target synchronous backup DC and the target asynchronous backup DC.
  • the number of candidate backup DCs is M (M>N), and N candidate backup DCs with transmission bandwidth priorities of 1 ⁇ N are selected as the target backup DCs from the transmission status information table, where the N target backup DCs The target backup DC with the highest transmission bandwidth priority is used as the target synchronous backup DC, and the remaining N 2 target backup DCs are used as the target asynchronous backup DC.
  • the number of candidate backup DCs is M (M>N), and N candidate backup DCs with transmission delay priorities of l ⁇ N are selected as the target backup DCs from the transmission state information table, where the N targets The target DC backup DC with the highest transmission delay priority in the backup DC is used as the target synchronous backup DC, and the remaining N 2 target backup DCs are used as the target asynchronous backup DC.
  • a second selection sub-unit 7042 configured to: if the data is the first type of data, select, from the transmission status information table, N candidate synchronous backup DCs with the highest transmission bandwidth priority as the target synchronous backup DC, and also if the data is used. For the second type of data, the N candidate synchronous backup DCs with the highest transmission delay priority are selected from the transmission status information table as the target synchronous backup DC.
  • the target backup DC only includes the target synchronous backup DC
  • the candidate backup DC only includes the candidate backup DC. Select the synchronous backup DC.
  • the third selection subunit 7043 is configured to: if the data is the first type of data, select, from the transmission state information table, N candidate asynchronous backup DCs with the highest transmission bandwidth priority as the target asynchronous backup DC, and also if the data is used. For the second type of data, the N candidate asynchronous backup DCs with the highest transmission delay priority are selected from the transmission status information table as the target asynchronous backup DC.
  • the target backup DC only includes the target asynchronous backup DC
  • the candidate backup DC only includes the candidate asynchronous backup DC.
  • the backup unit 705 is configured to send data to the target backup DC, so that the target backup DC saves a copy of the data.
  • the backup unit 705 After the selection unit 704 determines the target backup DC, the backup unit 705 sends data to the target backup DC, so that the target backup DC saves a copy of the data, and at the same time, the primary DC 70 also saves the original of the data.
  • the second detecting unit 707 when the backup unit 705 transmits data to the target backup DC, the second detecting unit 707 also detects the real-time transmission status between the primary DC 70 and the target backup DC 72.
  • the primary DC70 After the target synchronous backup DC and the primary DC70 successfully save the data sent by the user 71, the primary DC70 receives the backup success message sent by the target synchronous backup DC. At this time, the main DC 70 transmits an upload success message to the user 71. In the asynchronous backup task, the primary DC70 receives the backup success message sent by the target asynchronous backup DC.
  • the user 71 and the main DC 70 can use the HTTP interface for the communication connection, and the NFS (Network File System) or the CIFS (Common Internet File System) interface can be used, which is not specifically limited herein. .
  • NFS Network File System
  • CIFS Common Internet File System
  • the first triggering unit 706 is configured to trigger the first detecting unit 701 to perform an operation when the preset period expires.
  • a preset period is set.
  • the first detecting unit 701 starts detecting the transmission state between the primary DC and each candidate backup DC, and then the detection value is valid in the period, but The validity of the detected value also continues to age over time, so at the beginning of the next preset period, the first trigger unit 706 triggers the first detecting unit 701 to re-detect the transmission state, thereby ensuring the validity of the detected transmission state.
  • the preset period is set to 300 seconds.
  • the preset period can also be recorded in the transmission status information table.
  • the second detecting unit 707 is configured to detect a real-time transmission status between the primary DC 70 and the target backup DC 72 when the backup unit 705 performs an operation. This type of detection is ubiquitous in the data transmission process and will not be described here.
  • the second triggering unit 708 is configured to trigger the first detecting unit 701 to perform an operation when the real-time transmission status of any target backup DC is worse than the transmission status of the transmission status information table exceeds the second threshold.
  • the transmission bandwidth of the target backup DC can be reduced by 20%, or the transmission delay can be increased by 20%, which can be regarded as a specific manifestation of deterioration of the transmission state.
  • the first trigger unit 706 and the second trigger unit 708 can only be used one at a time.
  • the detecting unit 701 detects the transmission bandwidth and the transmission delay between the primary DC 70 and the candidate backup DC 72 according to the pre-selected update mechanism, so that the data backup device can grasp the network quality between the primary DC 70 and each candidate backup DC 72 in real time.
  • the maintenance unit 702 maintains the information in the transmission status information table.
  • the selecting unit 704 selects an appropriate candidate backup DC as the target backup DC according to the size of the data, the transmission status of the candidate backup DC72, and the expected number of copies N, and then sends data to the backup unit 705 for backup.
  • the backup process is based on network quality, so that the speed and success rate of uploading data by user 71 can be guaranteed to the greatest extent, and the efficiency of the cloud storage system is effectively improved.
  • a fifth embodiment of the present invention will be described in detail with respect to a data backup system.
  • the data backup system of this embodiment includes one or more devices for implementing one or more steps of the foregoing method. Therefore, the description of each step in the foregoing method applies to the corresponding device in the data backup system.
  • Figure 8 For the specific structure of the data backup system described in this embodiment, see Figure 8, including:
  • the user 81 is in communication connection with the main DC 80, and the main DC 80 is respectively connected to each candidate backup DC 82.
  • the data backup device 801 is a component of the main DC 80 and is loaded on the main DC 80.
  • the at least one candidate backup DC 82 is a synchronous backup DC, an asynchronous backup DC, or a mixture of the two.
  • the data backup device 801 can implement all the functions of the data backup device described in the foregoing third embodiment or the fourth embodiment, and details are not described herein again.
  • At least 1 candidate backup DC82 and user 81 can The functions of the candidate backup DC and the user described in the foregoing third embodiment or the fourth embodiment are implemented, and details are not described herein again.
  • the data backup device 801 checks the network status between the primary DC 80 and each candidate backup DC 82 by detecting the transmission status between the primary DC 80 and the candidate backup DC 82.
  • the transmission status and the expected number of copies N select the appropriate candidate backup DC as the target backup DC, and then send data to it and back it up.
  • the backup process is based on network quality, so it can maximize the speed and success rate of uploading data by users 81, and effectively improve the efficiency of cloud storage systems.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and the program includes some or all of the steps of the data backup method described in the foregoing method embodiments.
  • an embodiment of the present invention further provides a network device 900, including:
  • the input device 910, the output device 920, the memory 930, and the processor 940 (the number of the processors 940 in the network device may be one or more, and one processor in FIG. 9 is taken as an example;).
  • the input device 910, the output device 920, the memory 930, and the processor 940 may be connected by a bus or other means, wherein the bus connection is taken as an example in FIG.
  • the processor 940 performs the following steps: detecting a transmission status between the primary data center DC and the candidate backup DC, where the transmission status includes a transmission bandwidth and a transmission delay; according to data sent by the user, the transmission status, and the expected number of copies. N: selecting, from the candidate backup DC, a target backup DC that meets a preset condition; and transmitting the data to the target backup DC, so that the target backup DC saves a copy of the data.
  • the processor 940 can also perform the following steps:
  • the transmission status information table is maintained according to the transmission status, where the transmission status information table includes: a device name, a transmission bandwidth, a transmission delay, a transmission bandwidth priority, and a transmission delay priority of the candidate backup DC.
  • processor 940 can also perform the following steps:
  • the expected number N of copies stored by the memory 930 is equal to the number of expected synchronous backup copies Ni plus the number of expected asynchronous backup copies N 2 , the target backup DC including the target synchronous backup DC and the target asynchronous Backup DC, processor 940 can also perform the following steps:
  • the N candidate backup DCs with the highest transmission bandwidth priority are selected as the target backup DC from the transmission state information table, and the transmission bandwidth priority of the target synchronous backup DC is higher than that of the target Determining the transmission bandwidth priority of the target asynchronous backup DC; if the data is the second type of data, selecting the N candidate backup DCs with the highest transmission delay priority as the target backup DC from the transmission status information table, The transmission delay of the target synchronous backup DC is higher than the transmission delay priority of the target asynchronous backup DC; wherein, the number of the target synchronous backup DCs is N l 5, and the number of the target asynchronous backup DCs is N 2 .
  • the target backup DC stored by the memory 930 is a target synchronous backup DC
  • the candidate backup DC is a candidate synchronous backup DC
  • the processor 940 can also perform the following steps:
  • the N candidate synchronous backup DCs with the highest transmission bandwidth priority as the target synchronous backup DC from the transmission status information table; if the data is the second type of data, then The N candidate synchronous backup DCs having the highest transmission delay priority are selected as the target synchronous backup DC in the transmission state information table.
  • the target backup DC stored by the memory 930 is a target asynchronous backup DC
  • the candidate backup DC is a candidate asynchronous backup DC
  • the processor 940 can also perform the following steps:
  • N candidate asynchronous backup DCs with the highest transmission bandwidth priority as the target asynchronous backup DC from the transmission status information table; if the data is the second type of data, then The N candidate asynchronous backup DCs with the highest transmission delay priority are selected as the target asynchronous backup DC in the transmission state information table.
  • the processor 940 can also perform the following steps:
  • the step of detecting the transmission state between the primary DC and the candidate backup DC is triggered.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种数据备份方法、装置和系统,用于自适应选取备份DC,尤其是选取同步备份DC进行数据的同步备份。本发明实施例方法包括:检测主数据中心DC与候选备份DC之间的传输状态,所述传输状态包括传输带宽和传输时延;根据用户发送的数据、所述传输状态和期望副本数N从所述候选备份DC中选取符合预设条件的目标备份DC;向所述目标备份DC发送所述数据,使得所述目标备份DC保存所述数据的副本。通过实施本实施例技术方案,能够保证云存储系统中主DC与目标备份DC之间的网络质量,提高用户上传数据的成功率,同时能够提高云存储系统的效率。

Description

一种数据备份方法、 装置和系统 技术领域
本发明涉及数据存储技术领域,尤其涉及一种数据备份方法、装置和系统。
背景技术
云存储是一种新兴的数据存储方式,数据通过网络传输并存储于服务商所 提供的数据中心(DC, Data Center ), 然后, 用户通过网络接入实现对该数据 的存取操作。
目前,服务商为了保证所存储数据的持久度,对所存储的数据实施备份处 理。 在逻辑上, 云存储系统的数据中心包括: 主 DC、 同步备份 DC和异步备 份 DC三类, 其中, 主 DC用于与用户进行数据通信, 并存储数据的正本, 同 步备份 DC用于同步保存副本, 异步备份 DC用于异步保存副本。 副本数是根 据用户与服务商所签署的服务等级协议( SLA, Service Level Agreement )确定 的。 一个云存储系统模型中只有 1个主 DC, 但可以有多个同步备份 DC。 在 架设系统时会为同步备份 DC设置优先级,主 DC根据要求同步备份的副本数, 选择优先级最高的相应数量的同步备份 DC 进行副本的同步保存。 同步备份 DC保存副本后, 会向主 DC发送备份成功消息。 若此时主 DC也成功保存正 本, 则主 DC向用户发送上传成功消息。 异步备份则在后台以异步任务进行。
在上述现有技术方案中, 就用户而言, 数据只有在主 DC和同步备份 DC 中同时成功保存后, 才算上传成功。 但是, 由于同步备份 DC的优先级是固定 的, 因此主 DC只能固定选择优先级高的同步备份 DC进行同步备份。 一旦二 者之间的网络通道处于欠佳状态, 数据就可能无法同步备份到同步备份 DC, 或者需时长久才能同步备份到同步备份 DC。这种情况导致用户上传数据失败, 或者感觉上传速度緩慢, 影响了云存储系统的存储效率。
发明内容
为了解决上述问题,本发明实施例提供了一种数据备份方法、装置和系统, 用于动态选取同步备份 DC 进行数据的同步备份。 通过实施本实施例技术方 案, 能够保证云存储系统中主 DC与目标备份 DC之间的网络质量, 提高用户 上传数据的成功率, 同时能够提高云存储系统的效率。 本发明第一方面提供一种数据备份方法, 包括:
检测主数据中心 DC与候选备份 DC之间的传输状态, 所述传输状态包括 传输带宽和传输时延;
根据用户发送的数据、所述传输状态和期望副本数 N从所述候选备份 DC 中选取符合预设条件的目标备份 DC;
向所述目标备份 DC发送所述数据, 使得所述目标备份 DC保存所述数据 的副本。
在第一种可能的实现方式中, 所述检测主 DC与候选备份 DC之间的传输 状态之后还包括:
根据所述传输状态维护传输状态信息表, 所述传输状态信息表包括: 所述 候选备份 DC的设备名称、 传输带宽、 传输时延、 传输带宽优先级和传输时延 优先级。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中, 所 述主 DC根据所述传输状态维护传输状态信息表之后还包括:
当所述数据的容量大于第一门限值或其数据类型为第一类型时,确定所述 数据为第一类数据,当所述数据的容量小于所述第一门限值或其数据类型为第 二类型时, 确定所述数据为第二类数据。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中, 所 述期望副本数 N等于期望同步备份副本数 Ni加上期望异步备份副本数 N2,所 述目标备份 DC包括目标同步备份 DC和目标异步备份 DC ,
所述根据用户发送的数据、 所述传输状态和期望副本数 N从所述候选备 份 DC中选取符合预设条件的目标备份 DC包括:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC的传输 带宽优先级高于所述目标异步备份 DC的传输带宽优先级;
若所述数据为第二类数据,则从所述传输状态信息表中选择传输时延优先 级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC的传输 时延优先级高于所述目标异步备份 DC的传输时延优先级;
其中,所述目标同步备份 DC的数量为 ,所述目标异步备份 DC的数量 为 N2
本发明第二方面提供一种数据备份装置, 包括:
检测主数据中心 DC与候选备份 DC之间的传输状态, 所述传输状态包括 传输带宽和传输时延;
根据用户发送的数据、所述传输状态和期望副本数 N从所述候选备份 DC 中选取符合预设条件的目标备份 DC;
向所述目标备份 DC发送所述数据, 使得所述目标备份 DC保存所述数据 的副本。
在第一种可能的实现方式中, 所述数据备份装置还包括:
维护单元, 用于根据所述传输状态维护传输状态信息表, 所述传输状态信 息表包括: 所述候选备份 DC的设备名称、 传输带宽、 传输时延、 传输带宽优 先级和传输时延优先级。
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中, 所 述数据备份装置还包括:
判断单元,用于当所述数据的容量大于第一门限值或其数据类型为第一类 型时,确定所述数据为第一类数据,还用于当所述数据的容量小于所述第一门 限值或其数据类型为第二类型时, 确定所述数据为第二类数据。
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中, 所 述期望副本数 N等于期望同步备份副本数 Ni加上期望异步备份副本数 N2,所 述目标备份 DC包括目标同步备份 DC和目标异步备份 DC ,
所述选取单元具体包括:
第一选择子单元, 用于若所述数据为第一类数据, 则从所述传输状态信息 表中选择传输带宽优先级最高的 N个候选备份 DC作为目标备份 DC, 所述目 标同步备份 DC的传输带宽优先级高于所述目标异步备份 DC的传输带宽优先 级; 还用于若所述数据为第二类数据, 则从所述传输状态信息表中选择传输时 延优先级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC 的传输时延优先级高于所述目标异步备份 DC的传输时延优先级;
其中,所述目标同步备份 DC的数量为 ,所述目标异步备份 DC的数量 为 N2。 从以上技术方案可以看出, 本发明实施例具有以下优点:
通过检测主 DC与候选备份 DC之间的传输状态, 能够掌握主 DC与各候 选备份 DC之间的网络质量, 在备份进行时, 根据用户发送的数据、 传输状态 和期望副本数 N选择合适的候选备份 DC作为目标备份 DC,再向其发送数据。 该备份过程基于网络质量,因此能够最大限度保证用户上传数据的速度和成功 率, 同时也就有效提高了云存储系统的工作效率。
附图说明
图 1为本发明第一实施例的数据备份方法流程图;
图 2为本发明的云存储系统结构示意图;
图 3为本发明第二实施例的数据备份方法流程图;
图 4为本发明的一种检测次序示意图;
图 5为本发明的另一种检测次序示意图;
图 6为本发明第三实施例的数据备份装置结构图;
图 7为本发明第四实施例的数据备份装置结构图;
图 8为本发明第五实施例的数据备份系统结构图;
图 9为本发明提供的一种网络设备示意图。
具体实施方式
下面将结合本发明中的说明书附图,对发明中的技术方案进行清楚、 完整 地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实 施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前 提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供了一种数据备份方法,用于动态选取同步备份 DC进行 数据的同步备份。 通过实施本发明技术方案, 能够保证云存储系统中主 DC与 目标备份 DC之间的网络质量, 提高用户上传数据的成功率, 同时能够提高云 存储系统的效率。 本发明实施例还提供与该数据备份方法相关的装置和系统, 以下将分别对其进行详细说明。
本发明第一实施例将对一种数据备份方法进行详细说明,本实施例所要描 述的数据备份方法具体流程请参见图 1 , 包括步骤:
101、 检测主数据中心 DC与候选备份 DC之间的传输状态。 在本实施例中, 云存储系统结构请参见图 2, 包括主 DC201和至少 1个 候选备份 DC202, 主 DC201分别与各个候选备份 DC202通信连接, 在图中以 虚线表示。
在用户 203向云存储系统中的主 DC201上传数据前, 首先检测主 DC201 与各个候选备份 DC202之间的传输状态。 其中, 传输状态的内容至少包括主 DC201与各个候选备份 DC202之间的传输带宽和传输时延, 传输带宽和传输 时延能够直接反映主 DC201与候选备份 DC202之间的网络质量。
102、 根据用户发送的数据、 该传输状态和期望副本数 N从候选备份 DC 中选取符合预设条件的目标备份 DC。
其中, 期望副本数 N是根据 SLA所确定的副本数量, 在云存储系统架构 下, 1个副本只能保存于 1个备份 DC中。
请参见图 2, 主 DC201根据用户 203上传的数据、 主 DC201与各候选备 份 DC202之间的传输状态和用户 203的期望副本数 N, 从候选备份 DC202中 选取符合预设条件的目标备份 DC204, 目标备份 DC204的数量与期望副本数 N相同。
在本步骤中,对应于步骤 101中所检测的传输状态, 该预设条件的设定与 传输带宽和传输时延相关, 将在后续实施例中进行说明。
103、 向目标备份 DC发送数据, 使得目标备份 DC保存该数据的副本。 请参见图 2 ,在确定了目标备份 DC204后, 向目标备份 DC204发送数据, 在图中以实线表示, 使得目标备份 DC204保存数据的副本, 与此同时, 主 DC201也保存数据的正本。
在本实施例中, 通过检测主 DC与候选备份 DC之间的传输状态, 掌握主 DC与各候选备份 DC之间的网络质量,在备份进行时,根据用户发送的数据、 传输状态和期望副本数 N选择合适的候选备份 DC作为目标备份 DC, 再向其 发送数据。该备份过程基于网络质量, 因此能够最大限度保证用户上传数据的 速度和成功率, 同时也就有效提高了云存储系统的工作效率。
本发明第二实施例将对第一实施例所述的数据备份方法进行补充说明,本 实施例所述的数据备份方法具体流程请参见图 3, 包括步骤:
301、 检测主数据中心 DC与候选备份 DC之间的传输状态。 在本实施例中, 云存储系统结构请参见图 2, 其连接结构不再赘述。
在本步骤中, 检测主 DC201与各个候选备份 DC202之间的传输状态。 其 中, 传输状态的内容至少包括主 DC201与各个候选备份 DC202之间的传输带 宽和传输时延, 传输带宽和传输时延能够直接反映主 DC201 与候选备份 DC202之间的网络质量。
优选地, 检测任务具体可以包括但不限定于以下两种:
第一种、 主 DC维持 1个独立的后台任务。检测传输带宽时采用第一标准 容量大小的第一数据进行传输并检测, 第一数据一般为大数据,检测传输时延 时采用第二标准容量大小的第二数据进行传输并检测, 第二数据一般为小数 据, 检测传输时延还能够直接使用 ping命令。 检测时可根据预先设定的检测 次数多次测量并取平均值, 检测次数是针对每 1个候选备份 DC而言的。
第二种、 主 DC在正常的业务流程中, 根据预先设定的检测次数, 利用对 应次数的正常上传任务作为检测任务。主 DC首先判断上传任务中的数据的大 小, 一种方法是设定用于区别数据大小的门限值, 大于该门限值的为大数据, 小于的则为小数据, 大数据用于检测传输带宽, 小数据用于检测传输时延, 检 测传输时延还能够直接使用 ping命令。 判断数据的大小还能够基于数据的内 容类型进行, 例如, 视频流数据为大数据, 文本数据为小数据。
优选地, 在本步骤中, 实际检测操作为: 根据预设检测次数检测主 DC与 候选备份 DC之间的平均传输状态。 对各个候选备份 DC的传输状态进行检测 时, 检测次序可以包括但不限定于以下两种:
第一种、 每次使用 1个数据对所有候选备份 DC进行检测。
请参见图 4, 云存储系统包括主 DC、 第一备份 DC和第二备份 DC, 检测 次数为 3次, 用于检测的数据分别为 URL1、 URL2和 URL3 , 数据传输接口 为 HTTP, 上传方式为 HTTP/Put, 响应方式为 HTTP/Response。
第一次检测时,由主 DC分别向第一备份 DC和第二备份 DC发送 URL1 , 然后再接收响应。 第二次检测时, 由主 DC分别向第一备份 DC和第二备份 DC发送 URL2, 然后再接收响应。 第三次检测时, 由主 DC分别向第一备份 DC和第二备份 DC发送 URL3 , 然后再接收响应。 最终计算响应的传输状态 的平均值。 第二种、 按照预设检测次数逐一对所有候选备份 DC进行检测。 请参见图 5, 云存储系统包括主 DC、 第一备份 DC和第二备份 DC, 检测 次数为 3次, 用于检测的数据分别为 URL1、 URL2和 URL3 , 数据传输接口 为 HTTP, 上传方式为 HTTP/Put, 响应方式为 HTTP/Response。
首先, 由主 DC向第一备份 DC依次发送 URL1、 URL2和 URL3 , 并接收 对应的三次响应。 然后, 由主 DC向第二备份 DC依次发送 URL1、 URL2和
URL3 , 并接收对应的三次响应。
302、 根据该传输状态维护传输状态信息表。
请参见图 2, 在检测完各个候选备份 DC202的传输状态后, 根据该传输 状态维护传输状态信息表, 具体操作方式是刷新表中传输带宽、传输时延的平 均值, 并根据本次的检测结果对各个候选备份 DC202赋予传输带宽优先级和 传输时延优先级。例如,传输带宽最大的候选备份 DC的传输带宽优先级为 1 , 次之的则为 2, 并以此类推。
其中, 传输状态信息表包括: 候选备份 DC的设备名称、 传输带宽、 传输 时延、 传输带宽优先级和传输时延优先级。 优选地, 传输状态信息表还可以包 括步骤 301所述的检测次数的设定值,检测次数用于指示检测主 DC与候选备 份 DC之间的平均传输状态时所检测的次数。
一个传输状态信息表的具体实例请参见下表 1 , 该表中的参数全是举例, 不具有任何限定意义。
Figure imgf000009_0001
表 1
303、 当用户发送的数据的容量大于第一门限值时, 确定该数据为第一类 数据, 当该数据的容量小于第一门限值时, 确定该数据为第二类数据。
在本步骤中, 以数据容量作为区分数据大小的标志。 请参见图 2, 当用记 发送的数据的容量大于第一门限值时,确定该数据为第一类数据, 当数据的容 量小于第一门限值时, 确定该数据为第二类数据。
优选地, 第一门限值取值为 1MB, 则第一类数据为大数据, 第二类数据 为小数据。具体可以利用 HTTP请求消息中的 Content-Length头域来获取数据 的容量, 再进行判断区分。
另夕卜,在一些特殊的应用领域, 利用数据类型来判断数据的大小反而更加 方便。 因此, 本步骤还能够替换为: 当用户发送的数据的数据类型为第一类型 时, 确定该数据为第一类数据, 当该数据的数据类型为第二类型时, 确定该数 据为第二类数据。
优选地, 第一类型可以为多媒体类型, 第二类型为文本类型, 则第一类数 据为大数据, 第二类数据为小数据。具体可以嗅探数据文件的扩展名来确定数 据类型。
在本发明技术方案中, 一个重要原则是优选传输带宽较大的候选备份 DC 用于保存大数据, 优选传输时延较小的候选备份 DC保存小数据。
在本实施例中, 期望副本数 N等于期望同步备份副本数 加上期望异步 备份副本数 Ν2 , 目标备份 DC包括目标同步备份 DC和目标异步备份 DC。
304、 若该数据为第一类数据, 则从传输状态信息表中选择传输带宽优先 级最高的 N个候选备份 DC作为目标备份 DC, 目标同步备份 DC的传输带宽 优先级高于目标异步备份 DC的传输带宽优先级, 目标同步备份 DC的数量为 NL 5 目标异步备份 DC的数量为 N2, Ν=ΝΓΗΝ2
例如, 候选备份 DC的数量为 Μ ( Μ>Ν ), 从传输状态信息表中选择传输 带宽优先级为 1~Ν的 Ν个候选备份 DC作为目标备份 DC, 其中, 该 N个目 标备份 DC中传输带宽优先级最高的 个目标备份 DC作为目标同步备份 DC, 其余的 N2个目标备份 DC作为目标异步备份 DC。
305、 若该数据为第二类数据, 则从传输状态信息表中选择传输时延优先 级最高的 N个候选备份 DC作为目标备份 DC, 目标同步备份 DC的传输时延 优先级高于目标异步备份 DC的传输时延优先级, 目标同步备份 DC的数量为 NL 5 目标异步备份 DC的数量为 N2, Ν=ΝΓΗΝ2
例如, 候选备份 DC的数量为 Μ ( Μ>Ν ), 从传输状态信息表中选择传输 时延优先级为 1~Ν的 Ν个候选备份 DC作为目标备份 DC, 其中, 该 N个目 标备份 DC中传输时延优先级最高的 个目标备份 DC作为目标同步备份 DC, 其余的 N2个目标备份 DC作为目标异步备份 DC。 优选地, 目标备份 DC可以只包括目标同步备份 DC, 候选备份 DC可以 只包括候选同步备份 DC。 则步骤 304可以替换为: 若该数据为第一类数据, 则从传输状态信息表中选择传输带宽优先级最高的 N个候选同步备份 DC作为 目标同步备份 DC。 则步骤 305可以替换为: 若该数据为第二类数据, 则从传 输状态信息表中选择传输时延优先级最高的 N个候选同步备份 DC作为目标同 步备份 DC。
优选地, 目标备份 DC可以只包括目标异步备份 DC, 候选备份 DC可以 只包括候选异步备份 DC。 则步骤 304可以替换为: 若该数据为第一类数据, 则从传输状态信息表中选择传输带宽优先级最高的 N个候选异步备份 DC作为 目标异步备份 DC。 则步骤 305可以替换为: 若该数据为第二类数据, 则从传 输状态信息表中选择传输时延优先级最高的 N个候选异步备份 DC作为目标异 步备份 DC。
306、 向目标备份 DC发送数据, 使得目标备份 DC保存该数据的副本。 请参见图 2 ,在确定了目标备份 DC204后, 向目标备份 DC204发送数据, 在图中以实线表示, 使得目标备份 DC204保存数据的副本, 与此同时, 主 DC301也保存数据的正本。
优选地, 在向目标备份 DC发送数据时, 还将检测主 DC与目标备份 DC 之间的实时传输状态。
在目标同步备份 DC和主 DC都成功保存用户发送的数据后, 主 DC将接 收目标同步备份 DC发送的备份成功消息。 这时, 主 DC向用户发送上传成功 消息。 在异步备份任务中, 主 DC将接收目标异步备份 DC发送的备份成功消 息。
优选地, 用户与主 DC之间可采用 HTTP接口进行通信连接, 也可采用 NFS ( Network File System, 网络文件系统)或 CIFS ( Common Internet File System, 通用因特网文件系统)接口, 这里不作具体限定。
307、 当预设周期到期时, 触发执行检测主 DC与候选备份 DC之间的传 输状态。
在实际使用中, 主 DC与各候选备份 DC之间的实时传输状态时刻发生变 化, 因此, 必须设定检测传输状态的更新机制。 在本实施例中, 设定一个预设 周期,在该周期的初始时刻开始检测主 DC与各候选备份 DC的之间传输状态, 然后检测值在该周期内有效,但检测值的有效性也会随时间持续老化,故在下 一个预设周期开始时, 重新检测传输状态,从而保证所检测的传输状态的有效 性。 例如, 预设周期设置为 300秒。
优选地, 本步骤中所述的预设周期也可以记载于传输状态信息表中。 另一 个传输状态信息表的具体实例请参见下表 2, 该表中的参数全是举例, 不具有 任何限定意义。
Figure imgf000012_0001
表 2
优选地, 该更新机制还能够基于传输状态进行设计。 在步骤 306中, 在向 目标备份 DC发送数据时, 还可以检测主 DC与目标备份 DC之间的实时传输 状态。 这种检测在数据传输流程中普遍存在, 这里不再赘述。 当任一目标备份 DC的实时传输状态较传输状态信息表的传输状态恶化超过第二门限值时, 具 体可以为目标备份 DC的传输带宽减少了 20%,或者传输时延增加了 20%, 均 可视为传输状态恶化的具体表现。 在这种情况下, 触发执行检测主 DC与候选 备份 DC之间的传输状态。
在本实施例中, 周期性检测主 DC与候选备份 DC之间的传输带宽和传输 时延, 实时掌握主 DC与各候选备份 DC之间的网络质量, 在传输状态信息表 中维护这些传输状态信息。 在备份进行时, 根据数据的大小、 候选备份 DC的 传输状态和期望副本数选择合适的候选备份 DC作为目标备份 DC, 再向其发 送数据并进行备份。该备份过程基于网络质量, 因此能够最大限度保证用户上 传数据的速度和成功率, 同时也就有效提高了云存储系统的工作效率。
本发明第三实施例将对一种数据备份装置进行详细说明,本实施例所述的 数据备份装置中包含一个或多个单元用于实现前述方法的一个或多个步骤。因 此,对前述方法中各步骤的描述适用于本数据备份装置中相应的单元。本实施 例所述的数据备份装置具体结构请参见图 6, 包括:
第一检测单元 601、 选取单元 602和备份单元 603。 其中, 第一检测单元 601、 选取单元 602、 备份单元 603均能够与至少 1个候选备份 DC62进行通 信连接。 本数据备份装置能够作为独立的模块加载于主 DC60上。
第一检测单元 601 ,用于检测主 DC60与候选备份 DC62之间的传输状态。 在用户 61向主 DC60上传数据前, 第一检测单元 601会先检测主 DC60 与各个候选备份 DC62之间的传输状态。 其中, 传输状态的内容至少包含主 DC60与各个候选备份 DC62之间的传输带宽和传输时延, 传输带宽和传输时 延能够直接反映主 DC60与候选备份 DC62之间的网络质量。
选取单元 602, 用于根据用户发送的数据、该传输状态和期望副本数 N从 候选备份 DC62中选取符合预设条件的目标备份 DC。
其中, 本实施例所述的数据是指用户 61向主 DC60上传的数据, 期望副 本数 N是根据 SLA所确定的副本数量, 在云存储系统架构下, 1个副本只能 保存于 1个备份 DC中。
选取单元 602根据用户 61上传的数据、 主 DC60与各候选备份 DC62之 间的传输状态和用户 61的期望副本数 N, 从至少 1个候选备份 DC62中选取 符合预设条件的目标备份 DC, 目标备份 DC的数量与期望副本数 N相同。
所述预设条件的设定与传输带宽和传输时延相关,将在后续实施例中进行 说明。
备份单元 603, 用于向目标备份 DC发送数据, 使得目标备份 DC保存数 据的副本。
在选取单元 602确定了目标备份 DC后,备份单元 603向目标备份 DC发 送数据, 使得目标备份 DC保存数据的副本, 与此同时, 主 DC60中的存储单 元也保存数据的正本。
在本实施例中,检测单元 601通过检测主 DC60与候选备份 DC62之间的 传输状态,掌握主 DC60与各候选备份 DC62之间的网络质量,在备份进行时, 选取单元 602根据用户发送的数据、 传输状态和期望副本数 N选择合适的候 选备份 DC作为目标备份 DC, 备份单元 603再向目标备份 DC发送数据并进 行备份。 该备份过程基于网络质量, 因此能够最大限度保证用户 61上传数据 的速度和成功率, 同时也就有效提高了云存储系统的工作效率。
本发明第四实施例将对第三实施例所述的数据备份装置进行补充说明,本 实施例所述的数据备份装置中包含一个或多个单元用于实现前述方法的一个 或多个步骤。 因此,对前述方法中各步骤的描述适用于本数据备份装置中相应 的单元。 本实施例所述的数据备份装置具体结构请参见图 7 , 包括:
第一检测单元 701、 维护单元 702、 判断单元 703、 选取单元 704、 备份单 元 705、 第一触发单元 706、 第二检测单元 707、 第二触发单元 708。 其中, 第 一检测单元 701与维护单元 702通信连接,维护单元 702与判断单元 703通信 连接, 判断单元 703与选取单元 704通信连接, 选取单元 704与备份单元 705 通信连接, 选取单元 704、 备份单元 705分别与候选备份 DC72通信连接, 备 份单元 705还与第二检测单元 707通信连接,第二检测单元 707与第二触发单 元 708通信连接, 第一触发单元 706、 第二触发单元 708分别与第一检测单元 701通信连接。
优选地, 第一检测单元 701具体包括: 检测子单元 7011。 选取单元 704 具体包括:第一选择子单元 7041、第二选择子单元 7042、第三选择子单元 7043。
第一检测单元 701 , 检测主数据中心 DC70与候选备份 DC72之间的传输 状态。
其中, 传输状态的内容至少包括主 DC70与各个候选备份 DC72之间的传 输带宽和传输时延, 传输带宽和传输时延能够直接反映主 DC70 与候选备份 DC72之间的网络质量。
优选地, 检测任务具体可以包括但不限定于以下两种:
第一种、 主 DC维持 1个独立的后台任务。
第二种、 主 DC在正常的业务流程中, 根据预先设定的检测次数, 利用对 应次数的正常上传任务作为检 'j任务。
检测任务的这两种方式具体请参见第二实施例的相关记载, 这里不再赘 述。
第一检测单元 701具体包括:
检测子单元 7011 , 用于根据预设检测次数检测主 DC70与候选备份 DC72 之间的平均传输状态。
第一检测单元 701对各个候选备份 DC72的传输状态进行检测时,检测次 序可以包括但不限定于以下两种: 第一种、每次使用 1个数据对所有候选备份 DC进行检测。 具体请参见图 4及第二实施例的相关记载, 这里不再赘述。
第二种、 按照预设检测次数逐一对所有候选备份 DC进行检测。 具体请参 见图 5及第二实施例的相关记载, 这里不再赘述。
维护单元 702, 用于根据第一检测单元 701所检测的传输状态维护传输状 态信息表。
在第一检测单元 701检测完各个候选备份 DC72的传输状态后,维护单元 702 根据该传输状态维护传输状态信息表, 具体执行方式是刷新表中传输带 宽、传输时延的平均值, 并根据本次的检测结果对各个候选备份 DC72赋予传 输带宽优先级和传输时延优先级。 例如, 传输带宽最大的候选备份 DC的传输 带宽优先级为 1 , 次之的则为 2, 并以此类推。
其中, 传输状态信息表包括: 候选备份 DC的设备名称、 传输带宽、 传输 时延、 传输带宽优先级和传输时延优先级。 优选地, 传输状态信息表还可以包 括对第一检测单元 701 检测次数的设定值, 检测次数用于指示第一检测单元 701检测主 DC70与候选备份 DC72之间的平均传输状态时所检测的次数。
判断单元 703, 用于当用户发送的数据的容量大于第一门限值时, 确定该 数据为第一类数据,还用于当该数据的容量小于第一门限值时,确定该数据为 第二类数据。
在本实施例中, 以数据容量作为区分数据大小的标志。 优选地, 第一门限 值取值为 1MB, 则第一类数据为大数据, 第二类数据为小数据。 具体可以利 用 HTTP请求消息中的 Content-Length头域来获取数据的容量,再进行判断区 分。
另夕卜,在一些特殊的应用领域, 利用数据类型来判断数据的大小反而更加 方便。 因此, 判断单元 703还能用于: 当用户发送的数据的数据类型为第一类 型时, 确定该数据为第一类数据, 还用于当该数据的数据类型为第二类型时, 确定该数据为第二类数据。
优选地, 第一类型可以为多媒体类型, 第二类型为文本类型, 则第一类数 据为大数据, 第二类数据为小数据。具体可以嗅探数据文件的扩展名来确定数 据类型。 在本发明技术方案中, 一个重要原则是优选传输带宽较大的候选备份 DC 用于保存大数据, 优选传输时延较小的候选备份 DC保存小数据。
选取单元 704, 用于根据用户发送的数据、传输状态和期望副本数 N从候 选备份 DC72中选取符合预设条件的目标备份 DC。
选取单元 704具体包括: 第一选择子单元 7041、 第二选择子单元 7042和 第三选择子单元 7043。 三者同一时间只能选择一个执行操作。
第一选择子单元 7041 , 用于若该数据为第一类数据, 则从传输状态信息 表中选择传输带宽优先级最高的 N个候选备份 DC作为目标备份 DC, 目标同 步备份 DC的传输带宽优先级高于目标异步备份 DC的传输带宽优先级, 目标 同步备份 DC的数量为 NL 目标异步备份 DC的数量为 N2, Ν=ΝΓΗΝ2。 第一 选择子单元 7041 , 还用于若该数据为第二类数据, 则从传输状态信息表中选 择传输时延优先级最高的 Ν个候选备份 DC作为目标备份 DC, 目标同步备份 DC的传输时延优先级高于目标异步备份 DC的传输时延优先级, 目标同步备 份 DC的数量为 Nl 目标异步备份 DC的数量为 N2,
Figure imgf000016_0001
其中, 期望副本数 N等于期望同步备份副本数 ^加上期望异步备份副本 数 N2, 目标备份 DC包括目标同步备份 DC和目标异步备份 DC。
一个实例: 候选备份 DC的数量为 M ( M>N ), 从传输状态信息表中选择 传输带宽优先级为 1~N的 N个候选备份 DC作为目标备份 DC, 其中, 该 N 个目标备份 DC中传输带宽优先级最高的 个目标备份 DC作为目标同步备 份 DC, 其余的 N2个目标备份 DC作为目标异步备份 DC。
另一个实例: 候选备份 DC的数量为 M ( M>N ), 从传输状态信息表中选 择传输时延优先级为 l~N的 N个候选备份 DC作为目标备份 DC, 其中, 该 N 个目标备份 DC中传输时延优先级最高的 个目标备份 DC作为目标同步备 份 DC, 其余的 N2个目标备份 DC作为目标异步备份 DC。
第二选择子单元 7042, 用于若该数据为第一类数据, 则从传输状态信息 表中选择传输带宽优先级最高的 N 个候选同步备份 DC作为目标同步备份 DC, 还用于若该数据为第二类数据, 则从传输状态信息表中选择传输时延优 先级最高的 N个候选同步备份 DC作为目标同步备份 DC。
其中, 目标备份 DC只包括目标同步备份 DC, 候选备份 DC也只包括候 选同步备份 DC。
第三选择子单元 7043 , 用于若该数据为第一类数据, 则从传输状态信息 表中选择传输带宽优先级最高的 N 个候选异步备份 DC作为目标异步备份 DC, 还用于若该数据为第二类数据, 则从传输状态信息表中选择传输时延优 先级最高的 N个候选异步备份 DC作为目标异步备份 DC。
其中, 目标备份 DC只包括目标异步备份 DC, 候选备份 DC也只包括候 选异步备份 DC。
备份单元 705, 用于向目标备份 DC发送数据, 使得目标备份 DC保存该 数据的副本。
在选取单元 704确定了目标备份 DC后,备份单元 705向目标备份 DC发 送数据, 使得目标备份 DC保存数据的副本, 与此同时, 主 DC70也保存数据 的正本。
优选地, 在备份单元 705向目标备份 DC发送数据时, 第二检测单元 707 还将检测主 DC70与目标备份 DC72之间的实时传输状态。
在目标同步备份 DC和主 DC70都成功保存用户 71发送的数据后,主 DC70 将接收目标同步备份 DC发送的备份成功消息。 这时, 主 DC70向用户 71发 送上传成功消息。 在异步备份任务中, 主 DC70将接收目标异步备份 DC发送 的备份成功消息。
优选地, 用户 71与主 DC70之间可采用 HTTP接口进行通信连接, 也可 采用 NFS ( Network File System, 网络文件系统)或 CIFS ( Common Internet File System, 通用因特网文件系统)接口, 这里不作具体限定。
第一触发单元 706, 用于当预设周期到期时, 触发第一检测单元 701执行 操作。
在实际使用中, 主 DC70与各候选备份 DC72之间的实时传输状态时刻发 生变化, 因此, 必须设定检测传输状态的更新机制。 在本实施例中, 设定一个 预设周期, 在该周期的初始时刻, 第一检测单元 701开始检测主 DC与各候选 备份 DC的之间传输状态, 然后检测值在该周期内有效, 但检测值的有效性也 会随时间持续老化,故在下一个预设周期开始时, 第一触发单元 706触发第一 检测单元 701重新检测传输状态,从而保证所检测的传输状态的有效性。例如, 预设周期设置为 300秒。
优选地, 预设周期也可以记载于传输状态信息表中。
第二检测单元 707, 用于当备份单元 705执行操作时, 检测主 DC70与目 标备份 DC72之间的实时传输状态。 这种检测在数据传输流程中普遍存在, 这 里不再赘述。
第二触发单元 708 , 用于当任一目标备份 DC的实时传输状态较传输状态 信息表的传输状态恶化超过第二门限值时, 触发第一检测单元 701执行操作。 具体可以为目标备份 DC的传输带宽减少了 20%, 或者传输时延增加了 20%, 均可视为传输状态恶化的具体表现。
其中, 第一触发单元 706和第二触发单元 708同一时间只能择一使用。 在本实施例中,检测单元 701按预选的更新机制检测主 DC70与候选备份 DC72之间的传输带宽和传输时延, 使本数据备份装置实时掌握主 DC70与各 候选备份 DC72之间的网络质量,并由维护单元 702在传输状态信息表中维护 这些信息。 在备份进行时, 选取单元 704根据数据的大小、 候选备份 DC72的 传输状态和期望副本数 N选择合适的候选备份 DC作为目标备份 DC, 再通过 备份单元 705向其发送数据进行备份。该备份过程基于网络质量, 因此能够最 大限度保证用户 71上传数据的速度和成功率, 同时也就有效提高了云存储系 统的工作效率。
本发明第五实施例将对一种数据备份系统进行详细说明,本实施例所述的 数据备份系统中包含一个或多个装置用于实现前述方法的一个或多个步骤。因 此,对前述方法中各步骤的描述适用于本数据备份系统中相应的装置。本实施 例所述的数据备份系统具体结构请参见图 8, 包括:
数据备份装置 801、 主 DC80、 至少 1个候选备份 DC82和用户 81。 其中, 用户 81与主 DC80通信连接, 主 DC80分别与各个候选备份 DC82通信连接。 数据备份装置 801主 DC80的组成部件, 加载于主 DC80上。
优选地, 该至少 1个候选备份 DC82为同步备份 DC、 异步备份 DC或二 者的混合。
数据备份装置 801 能够实现前述第三实施例或第四实施例所述的数据备 份装置的全部功能, 这里不再赘述。 至少 1个候选备份 DC82和用户 81能够 实现前述第三实施例或第四实施例所述的候选备份 DC和用户的全部功能,这 里也不再赘述。
在本实施例中, 数据备份装置 801通过检测主 DC80与候选备份 DC82之 间的传输状态, 掌握主 DC80与各候选备份 DC82之间的网络质量, 在备份进 行时, 根据用户 81发送的数据、 传输状态和期望副本数 N选择合适的候选备 份 DC作为目标备份 DC, 再向其发送数据并进行备份。 该备份过程基于网络 质量, 因此能够最大限度保证用户 81上传数据的速度和成功率, 同时也就有 效提高了云存储系统的工作效率。
本发明实施例还提供一种计算机存储介质, 其中, 该计算机存储介质可存 储有程序,该程序执行时包括上述方法实施例中记载的数据备份方法的部分或 全部步骤。
请参见图 9, 本发明实施例还提供一种网络设备 900, 包括:
输入装置 910、 输出装置 920、 存储器 930和处理器 940 (网络设备中的 处理器 940的数量可以为一个或多个, 图 9中以一个处理器为例;)。 在本发明 的一些实施例中, 输入装置 910、 输出装置 920、 存储器 930和处理器 940可 通过总线或其它方式连接, 其中, 图 9中以通过总线连接为例。
其中, 处理器 940执行如下步骤: 检测主数据中心 DC与候选备份 DC之 间的传输状态,所述传输状态包括传输带宽和传输时延;根据用户发送的数据、 所述传输状态和期望副本数 N从所述候选备份 DC中选取符合预设条件的目标 备份 DC; 向所述目标备份 DC发送所述数据, 使得所述目标备份 DC保存所 述数据的副本。
在本发明一些实施例中, 处理器 940还可执行如下步骤:
根据所述传输状态维护传输状态信息表, 所述传输状态信息表包括: 所述 候选备份 DC的设备名称、 传输带宽、 传输时延、 传输带宽优先级和传输时延 优先级。
在本发明的一些实施例中, 处理器 940还可执行如下步骤:
当所述数据的容量大于第一门限值或其数据类型为第一类型时,确定所述 数据为第一类数据,当所述数据的容量小于所述第一门限值或其数据类型为第 二类型时, 确定所述数据为第二类数据。 在本发明的一些实施例中, 存储器 930所存储的所述期望副本数 N等于 期望同步备份副本数 Ni加上期望异步备份副本数 N2, 所述目标备份 DC包括 目标同步备份 DC和目标异步备份 DC, 处理器 940还可执行如下步骤:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC的传输 带宽优先级高于所述目标异步备份 DC的传输带宽优先级;若所述数据为第二 类数据, 则从所述传输状态信息表中选择传输时延优先级最高的 N个候选备 份 DC作为目标备份 DC, 所述目标同步备份 DC的传输时延优先级高于所述 目标异步备份 DC的传输时延优先级; 其中, 所述目标同步备份 DC的数量为 Nl 5 所述目标异步备份 DC的数量为 N2
在本发明的一些实施例中,存储器 930所存储的所述目标备份 DC为目标 同步备份 DC, 所述候选备份 DC为候选同步备份 DC, 处理器 940还可执行 如下步骤:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选同步备份 DC作为目标同步备份 DC; 若所述数据为第二类 数据, 则从所述传输状态信息表中选择传输时延优先级最高的 N个候选同步 备份 DC作为目标同步备份 DC。
在本发明的一些实施例中,存储器 930所存储的所述目标备份 DC为目标 异步备份 DC, 所述候选备份 DC为候选异步备份 DC, 处理器 940还可执行 如下步骤:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选异步备份 DC作为目标异步备份 DC; 若所述数据为第二类 数据, 则从所述传输状态信息表中选择传输时延优先级最高的 N个候选异步 备份 DC作为目标异步备份 DC。
在本发明一些实施例中, 处理器 940还可执行如下步骤:
当预设周期到期时, 触发执行所述检测主 DC与候选备份 DC之间的传输 状态的步骤,或当任一目标备份 DC的实时传输状态较所述传输状态信息表的 传输状态恶化超过第二门限值时, 触发执行所述检测主 DC与候选备份 DC之 间的传输状态的步骤。 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明所提供的一种数据备份方法、 装置和系统进行了详细介绍, 对于本领域的一般技术人员,依据本发明实施例的思想,在具体实施方式及应 用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限 制。

Claims

权利要求
1、 一种数据备份方法, 其特征在于, 包括:
检测主数据中心 DC与候选备份 DC之间的传输状态, 所述传输状态包括 传输带宽和传输时延;
根据用户发送的数据、所述传输状态和期望副本数 N从所述候选备份 DC 中选取符合预设条件的目标备份 DC;
向所述目标备份 DC发送所述数据, 使得所述目标备份 DC保存所述数据 的副本。
2、 根据权利要求 1所述的方法, 其特征在于, 所述检测主 DC与候选备 份 DC之间的传输状态之后还包括:
根据所述传输状态维护传输状态信息表, 所述传输状态信息表包括: 所述 候选备份 DC的设备名称、 传输带宽、 传输时延、 传输带宽优先级和传输时延 优先级。
3、 根据权利要求 2所述的方法, 其特征在于, 所述主 DC根据所述传输 状态维护传输状态信息表之后还包括:
当所述数据的容量大于第一门限值或其数据类型为第一类型时,确定所述 数据为第一类数据,当所述数据的容量小于所述第一门限值或其数据类型为第 二类型时, 确定所述数据为第二类数据。
4、 根据权利要求 3所述的方法, 其特征在于, 所述期望副本数 N等于期 望同步备份副本数 加上期望异步备份副本数 N2, 所述目标备份 DC包括目 标同步备份 DC和目标异步备份 DC,
所述根据用户发送的数据、 所述传输状态和期望副本数 N从所述候选备 份 DC中选取符合预设条件的目标备份 DC包括:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC的传输 带宽优先级高于所述目标异步备份 DC的传输带宽优先级;
若所述数据为第二类数据,则从所述传输状态信息表中选择传输时延优先 级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC的传输 时延优先级高于所述目标异步备份 DC的传输时延优先级; 其中,所述目标同步备份 DC的数量为 ,所述目标异步备份 DC的数量 为 N2
5、 根据权利要求 3所述的方法, 其特征在于, 所述目标备份 DC为目标 同步备份 DC , 所述候选备份 DC为候选同步备份 DC ,
所述根据用户发送的数据、 所述传输状态和期望副本数 N从所述候选备 份 DC中选取符合预设条件的目标备份 DC包括:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选同步备份 DC作为目标同步备份 DC;
若所述数据为第二类数据,则从所述传输状态信息表中选择传输时延优先 级最高的 N个候选同步备份 DC作为目标同步备份 DC。
6、 根据权利要求 3所述的方法, 其特征在于, 所述目标备份 DC为目标 异步备份 DC, 所述候选备份 DC为候选异步备份 DC,
所述根据用户发送的数据、 所述传输状态和期望副本数 N从所述候选备 份 DC中选取符合预设条件的目标备份 DC包括:
若所述数据为第一类数据,则从所述传输状态信息表中选择传输带宽优先 级最高的 N个候选异步备份 DC作为目标异步备份 DC;
若所述数据为第二类数据,则从所述传输状态信息表中选择传输时延优先 级最高的 N个候选异步备份 DC作为目标异步备份 DC。
7、 根据权利要求 2至 6任一项所述的方法, 其特征在于,
所述检测主 DC与候选备份 DC之间的传输状态包括:
根据预设检测次数检测主 DC与候选备份 DC之间的平均传输状态。
8、 根据权利要求 1至 6任一项所述的方法, 其特征在于, 所述数据备份 方法还包括:
当预设周期到期时, 触发执行所述检测主 DC与候选备份 DC之间的传输 状态的步骤。
9、 根据权利要求 2至 6任一项所述的方法, 其特征在于, 所述向所述目 标备份 DC发送所述数据时,检测主 DC与目标备份 DC之间的实时传输状态; 所述数据备份方法还包括:
当任一目标备份 DC 的实时传输状态较所述传输状态信息表的传输状态 恶化超过第二门限值时, 触发执行所述检测主 DC与候选备份 DC之间的传输 状态的步骤。
10、 一种数据备份装置, 其特征在于, 包括:
第一检测单元,用于检测主数据中心 DC与候选备份 DC之间的传输状态, 所述传输状态包括传输带宽和传输时延;
选取单元, 用于根据用户发送的数据、 所述传输状态和期望副本数 N从 所述候选备份 DC中选取符合预设条件的目标备份 DC;
备份单元, 用于向所述目标备份 DC发送所述数据, 使得所述目标备份 DC保存所述数据的副本。
11、 根据权利要求 10所述的装置, 其特征在于, 所述数据备份装置还包 括:
维护单元, 用于根据所述传输状态维护传输状态信息表, 所述传输状态信 息表包括: 所述候选备份 DC的设备名称、 传输带宽、 传输时延、 传输带宽优 先级和传输时延优先级。
12、 根据权利要求 11所述的装置, 其特征在于, 所述数据备份装置还包 括:
判断单元,用于当所述数据的容量大于第一门限值或其数据类型为第一类 型时,确定所述数据为第一类数据,还用于当所述数据的容量小于所述第一门 限值或其数据类型为第二类型时, 确定所述数据为第二类数据。
13、 根据权利要求 12所述的装置, 其特征在于, 所述期望副本数 N等于 期望同步备份副本数 Ni加上期望异步备份副本数 N2, 所述目标备份 DC包括 目标同步备份 DC和目标异步备份 DC,
所述选取单元具体包括:
第一选择子单元, 用于若所述数据为第一类数据, 则从所述传输状态信息 表中选择传输带宽优先级最高的 N个候选备份 DC作为目标备份 DC, 所述目 标同步备份 DC的传输带宽优先级高于所述目标异步备份 DC的传输带宽优先 级; 还用于若所述数据为第二类数据, 则从所述传输状态信息表中选择传输时 延优先级最高的 N个候选备份 DC作为目标备份 DC, 所述目标同步备份 DC 的传输时延优先级高于所述目标异步备份 DC的传输时延优先级; 其中,所述目标同步备份 DC的数量为 ,所述目标异步备份 DC的数量 为 N2
14、 根据权利要求 12所述的装置, 其特征在于, 所述目标备份 DC为目 标同步备份 DC , 所述候选备份 DC为候选同步备份 DC ,
所述选取单元具体包括:
第二选择子单元, 用于若所述数据为第一类数据, 则从所述传输状态信息 表中选择传输带宽优先级最高的 N 个候选同步备份 DC作为目标同步备份 DC; 还用于若所述数据为第二类数据, 则从所述传输状态信息表中选择传输 时延优先级最高的 N个候选同步备份 DC作为目标同步备份 DC。
15、 根据权利要求 12所述的装置, 其特征在于, 所述目标备份 DC为目 标异步备份 DC, 所述候选备份 DC为候选异步备份 DC,
所述选取单元具体包括:
第三选择子单元, 用于若所述数据为第一类数据, 则从所述传输状态信息 表中选择传输带宽优先级最高的 N 个候选异步备份 DC作为目标异步备份 DC; 还用于若所述数据为第二类数据, 则从所述传输状态信息表中选择传输 时延优先级最高的 N个候选异步备份 DC作为目标异步备份 DC。
16、 根据权利要求 11至 15任一项所述的装置, 其特征在于, 所述第一检 测单元具体包括:
检测子单元, 用于根据预设检测次数检测主 DC与候选备份 DC之间的平 均传输状态。
17、 根据权利要求 10至 15任一项所述的装置, 其特征在于, 所述数据备 份装置还包括:
第一触发单元,用于当预设周期到期时,触发所述第一检测单元执行操作。
18、 根据权利要求 11至 15任一项所述的装置, 其特征在于, 所述数据备 份装置还包括:
第二检测单元, 用于当所述备份单元执行操作时, 检测主 DC与目标备份 DC之间的实时传输状态;
第二触发单元,用于当任一目标备份 DC的实时传输状态较所述传输状态 信息表的传输状态恶化超过第二门限值时, 触发所述第一检测单元执行操作。
19、 一种数据备份系统, 其特征在于, 包括:
如权利要求 10至 18任一项所述的数据备份装置、主数据中心 DC和至少 1个候选备份 DC;
所述数据备份装置为所述主 DC的组成部件, 所述主 DC和所述至少 1个 候选备份 DC通信连接。
PCT/CN2012/087435 2012-12-25 2012-12-25 一种数据备份方法、装置和系统 WO2014100978A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201280003654.9A CN104137512B (zh) 2012-12-25 2012-12-25 一种数据备份方法、装置和系统
CN201710214828.0A CN107247638B (zh) 2012-12-25 2012-12-25 一种数据备份方法、装置和系统
PCT/CN2012/087435 WO2014100978A1 (zh) 2012-12-25 2012-12-25 一种数据备份方法、装置和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/087435 WO2014100978A1 (zh) 2012-12-25 2012-12-25 一种数据备份方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2014100978A1 true WO2014100978A1 (zh) 2014-07-03

Family

ID=51019658

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087435 WO2014100978A1 (zh) 2012-12-25 2012-12-25 一种数据备份方法、装置和系统

Country Status (2)

Country Link
CN (2) CN107247638B (zh)
WO (1) WO2014100978A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009018B (zh) * 2016-10-28 2020-08-25 华为技术有限公司 一种负载调整方法、装置及系统
CN108459926B (zh) * 2018-02-26 2020-05-15 新华三技术有限公司 数据异地备份方法、装置及计算机可读介质
CN111930566A (zh) * 2020-07-28 2020-11-13 友谊时光科技股份有限公司 一种数据备份方法、装置、电子设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808012A (zh) * 2010-03-31 2010-08-18 重庆索伦互联网信息服务有限公司 一种云环境下的数据备份方法
CN102404399A (zh) * 2011-11-18 2012-04-04 浪潮电子信息产业股份有限公司 一种云存储资源模糊动态分配方法
US20120166394A1 (en) * 2010-12-24 2012-06-28 Kim Mi-Jeom Distributed storage system and method for storing objects based on locations
CN102571968A (zh) * 2012-01-17 2012-07-11 华中科技大学 云备份系统中的数据定向转发方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8095931B1 (en) * 2006-04-27 2012-01-10 Vmware, Inc. Controlling memory conditions in a virtual machine
CN101094154B (zh) * 2007-06-28 2010-09-29 北京亚细亚智业科技有限公司 一种多主控模式的数据备份异地保护系统以及保护方法
CN102117231A (zh) * 2009-12-30 2011-07-06 上海文广互动电视有限公司 一种分布式数据备份容灾系统以及方法
CN102377827A (zh) * 2011-12-13 2012-03-14 方正国际软件有限公司 多级云存储系统及其存储方法
CN102694677A (zh) * 2012-04-11 2012-09-26 佳都新太科技股份有限公司 基于远程ip解析灾备数据中心的建设新方法
CN102752381A (zh) * 2012-06-28 2012-10-24 北京邮电大学 一种应用于分布式存储的多活动副本机制及其存取方法
CN102752390A (zh) * 2012-07-10 2012-10-24 浪潮集团山东通用软件有限公司 一种基于用户位置信息的虚拟资源调配方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101808012A (zh) * 2010-03-31 2010-08-18 重庆索伦互联网信息服务有限公司 一种云环境下的数据备份方法
US20120166394A1 (en) * 2010-12-24 2012-06-28 Kim Mi-Jeom Distributed storage system and method for storing objects based on locations
CN102404399A (zh) * 2011-11-18 2012-04-04 浪潮电子信息产业股份有限公司 一种云存储资源模糊动态分配方法
CN102571968A (zh) * 2012-01-17 2012-07-11 华中科技大学 云备份系统中的数据定向转发方法

Also Published As

Publication number Publication date
CN104137512A (zh) 2014-11-05
CN107247638A (zh) 2017-10-13
CN104137512B (zh) 2017-06-20
CN107247638B (zh) 2020-12-15

Similar Documents

Publication Publication Date Title
US7197571B2 (en) System and method for improving backup performance of media and dynamic ready to transfer control mechanism
US8898311B2 (en) Data communication method and information processing device
CN105302676B (zh) 一种分布式文件系统的主备机制数据传输方法及装置
WO2018121742A1 (zh) 一种流数据的传输方法和装置
WO2018057445A1 (en) Methods and systems for instantaneous asynchronous media sharing
EP3873067A1 (en) Data transmission method and apparatus
EP2918138B1 (en) Method and apparatus for providing web service in wireless communication system
CA2908718C (en) System and method for streaming a media file from a server to a client device
CN112261142B (zh) 一种rdma网络的数据重传方法、装置及fpga
US20140119243A1 (en) Remote Conference Saving System and Storage Medium
WO2017185615A1 (zh) 一种业务处理设备的业务状态确定方法及调度设备
WO2014100978A1 (zh) 一种数据备份方法、装置和系统
CN107104822B (zh) 服务器备灾处理方法、装置、存储介质及电子设备
KR20200031630A (ko) 네트워크 구성 데이터의 조건부 브로드캐스팅을 위한 방법 및 장치
EP2634995A1 (en) Apparatus and method of displaying contents using key frames in a terminal
CN103650401A (zh) 一种移动终端内部通信方法
US20140297791A1 (en) Communication apparatus, method of controlling the same, and storage medium
US9270776B2 (en) Dynamically adjusting delivery of content between terminal device and server
EP2580671A1 (en) Http-based client-server communication system and method
US20140247718A1 (en) Reducing TCP Timeouts due to Incast Collapse at a Network Switch
WO2020082839A1 (zh) 报文处理方法、相关设备及计算机存储介质
US9437205B2 (en) Method, application, and device for audio signal transmission
JP2009217765A (ja) 複数宛先への同期送信方法、その実施システム及び処理プログラム
EP1793555A1 (en) Faster than real time streaming in a playlist context
CN110519397B (zh) 一种基于nginx的sip终端接入的负载均衡系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12891090

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12891090

Country of ref document: EP

Kind code of ref document: A1