Data backup storage method and device, electronic device and storage medium

By determining the number of data replicas in the data backup storage system and determining the storage unit in combination with the device weight and fault domain level, the problems of high load of the main control node and coarse granularity of fault domain division are solved, and decentralized and cross-fault domain data are realized Backup storage to improve system performance and reliability.

CN112068976BActive Publication Date: 2025-02-21BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910498627.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-10
Publication Date
2025-02-21
Estimated Expiration
2039-06-10

Smart Images

  • Figure CN112068976B_ABST
    Figure CN112068976B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data backup storage method and device, an electronic device, and a storage medium, and relates to the technical field of data storage, and can be applied to application scenarios for storing multiple data copies. The data backup storage method includes: in response to a data storage request, determining the first target data in the data storage request, and taking the number of data copies of the first target data as the target number; obtaining the device weight of the storage unit and the pre-configured fault domain level; determining the target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is respectively distributed in a different fault domain; and storing the first target data in each first storage unit respectively. The present disclosure can store multiple data copies of the same data in storage devices under different fault domains, respectively, to achieve data storage across fault domains, and enhance the performance and reliability of the entire storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Currently, when backing up data, the client needs to communicate with the master node that controls the data backup before writing data. The data backup master node selects a specified number of storage nodes to store the data and its replica data according to the storage strategy.

[0003] When the client reads data, it also needs to communicate with the master node to request the data storage node. When a large number of data read and write requests occur, concurrent access problems are likely to occur, which will drag down the master node. In addition, the storage location of the data needs to be stored as metadata on the master node. When the metadata storage of the master node fails, the entire storage system will fail.

[0004] In addition, there is currently no specific standard for fault domain division of data storage, resulting in a coarse granularity problem in fault domain division.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a data backup storage method, a data backup storage device, an electronic device and a computer-readable storage medium, thereby at least to a certain extent overcoming the system performance and reliability bottlenecks caused by the master control node that controls the data backup storage and the problem of too coarse granularity of fault domain division.

[0007] According to a first aspect of the present disclosure, a data backup storage method is provided, including: in response to a data storage request, determining first target data in the data storage request, and taking the number of data copies of the first target data as a target number; obtaining a device weight of a storage unit and a pre-configured fault domain level; determining a target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is respectively distributed in a different fault domain; and storing the first target data in each first storage unit respectively.

[0008] Optionally, before responding to a data storage request, determining the first target data in the data storage request, and taking the number of data copies of the first target data as the target number, the method also includes: determining a fault domain level; determining a fault subdomain corresponding to the fault domain according to the fault domain level; and determining an intermediate storage unit corresponding to the fault subdomain.

[0009] Optionally, the above method also includes: determining a basic storage unit for storing data and device information of the basic storage unit; wherein the device information includes device type and current storage capacity; determining a basic device weight of the basic storage unit based on the device information; determining an intermediate device weight of each intermediate storage unit based on the basic device weight; wherein the basic device weight and the intermediate device weight are included in the device weight.

[0010] Optionally, determining a target number of first storage units in combination with device weight and fault domain level includes: determining a first data identifier of the first target data and a first device identifier of the storage unit; and determining a first storage unit in each of the target number of fault domains based on the first data identifier, the first device identifier and the device weight.

[0011] Optionally, determining a first storage unit in a target number of fault domains according to the first data identifier, the first device identifier and the device weight includes: performing a hash operation on the first data identifier, the first device identifier and the device weight to obtain an intermediate operation result; and determining a first storage unit in the target number of fault domains according to the intermediate operation result.

[0012] Optionally, after storing the first target data in each first storage unit respectively, the above method also includes: in response to a data acquisition request, determining the second target data in the data acquisition request and a second data identifier corresponding to the second target data; determining multiple second storage units corresponding to the second data identifier; and acquiring the second target data from any second storage unit.

[0013] Optionally, obtaining the second target data from any second storage unit includes: determining second device identifiers corresponding to the plurality of second storage units respectively; randomly determining a second device identifier as a target device identifier; and obtaining the second target data according to the target device identifier.

[0014] According to a second aspect of the present disclosure, a data backup storage device is provided, including: a request response module, used to respond to a data storage request, determine the first target data in the data storage request, and use the number of data copies of the first target data as the target number; an information acquisition module, used to obtain the device weight of the storage unit and the pre-configured fault domain level; a device determination module, used to determine the target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is respectively distributed in a different fault domain; and a data storage module, used to store the first target data in each first storage unit respectively.

[0015] Optionally, the information acquisition module includes a fault domain configuration unit, which is used to determine the fault domain level; determine the fault subdomain corresponding to the fault domain according to the fault domain level; and determine the intermediate storage unit corresponding to the fault subdomain.

[0016] Optionally, the information acquisition module also includes a weight configuration unit, which is used to determine a basic storage unit for storing data and device information of the basic storage unit; wherein the device information includes device type and current storage capacity; determine a basic device weight of the basic storage unit based on the device information; determine an intermediate device weight of each intermediate storage unit based on the basic device weight; wherein the basic device weight and the intermediate device weight are included in the device weight.

[0017] Optionally, the device determination module includes a device determination unit, which is used to determine a first data identifier of a first target data and a first device identifier of a storage unit; and determine a first storage unit in each of a target number of fault domains according to the first data identifier, the first device identifier and the device weight.

[0018] Optionally, the device determination unit includes a device determination subunit, which is used to obtain an intermediate operation result after performing a hash operation on the first data identifier, the first device identifier and the device weight; and determine a first storage unit in each of the target number of fault domains according to the intermediate operation result.

[0019] Optionally, the data backup storage device includes a data acquisition module, which is used to respond to a data acquisition request, determine the second target data in the data acquisition request and a second data identifier corresponding to the second target data; determine multiple second storage units corresponding to the second data identifier; and acquire the second target data from any second storage unit.

[0020] Optionally, the data acquisition module includes a data acquisition unit, which is used to determine the second device identifiers corresponding to the multiple second storage units respectively; randomly determine a second device identifier as a target device identifier; and acquire the second target data according to the target device identifier.

[0021] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the data backup storage method according to any one of the above items is implemented.

[0022] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data backup storage method according to any one of the above items is implemented.

[0023] The data backup storage method in the exemplary embodiment of the present disclosure, first, in response to a data storage request, determines the first target data in the data storage request, and takes the number of data copies of the first target data as the target number; second, obtains the device weight of the storage unit and the pre-configured fault domain level; third, determines the target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is distributed in a different fault domain; and stores the first target data in each first storage unit. Through the data backup storage method of the present disclosure, on the one hand, the number of data copies in the data storage request is determined, and the number of first storage units required for this data storage can be determined according to the number of data copies. On the other hand, the process of determining the target number of first storage units can be performed on the client according to the device weight and the fault domain level, without the need for the master node to allocate storage nodes, thereby realizing decentralized data backup storage. On the other hand, the target number of first storage units are distributed in different fault domains, and when the master node in one fault domain is damaged, the client can read the target data from the storage units in other fault domains, thereby realizing the purpose of data backup storage across fault domains. On the other hand, users can configure the fault domain level in advance and define a set of fault domain division standards with finer granularity. Users can flexibly use fault domains during data backup by pre-configuring the fault domain level.

[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0026] Figure 1 A flowchart of a data backup storage method according to an exemplary embodiment of the present disclosure is schematically shown;

[0027] Figure 2 A storage unit hierarchy diagram schematically illustrates a storage unit corresponding to each level of a storage system according to an exemplary embodiment of the present disclosure;

[0028] Figure 3 A first block diagram schematically shows a data backup storage device according to an exemplary embodiment of the present disclosure;

[0029] Figure 4A first block diagram schematically illustrates an information acquisition module according to an exemplary embodiment of the present disclosure;

[0030] Figure 5 A second block diagram schematically illustrates an information acquisition module according to an exemplary embodiment of the present disclosure;

[0031] Figure 6 Schematically shows a block diagram of a device determination module according to an exemplary embodiment of the present disclosure;

[0032] Figure 7 Schematically shows a block diagram of a device determination unit according to an exemplary embodiment of the present disclosure;

[0033] Figure 8 A second block diagram schematically illustrates a data backup storage device according to an exemplary embodiment of the present disclosure;

[0034] Fig. 9 Schematically shows a block diagram of a data acquisition module according to an exemplary embodiment of the present disclosure;

[0035] Fig.10 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;

[0036] Fig.11 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0038] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0039] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.

[0040] When the client backs up or reads data, it needs to communicate with the master node that controls the data backup. When a large number of data read and write requests occur, concurrent access problems are likely to cause the master node to crash. In addition, the data storage location needs to be stored as metadata on the master node. When the metadata storage of the master node fails, the entire storage system will fail. In addition, there is currently no specific standard for the division of data storage fault domains, and there is a problem of coarse granularity in fault domain division.

[0041] Based on this, in this exemplary embodiment, a data backup storage method is first provided. The data backup storage method of the present disclosure can be implemented by using a server, or by using a terminal device, wherein the terminal device can be, for example, a mobile terminal such as a mobile phone, a tablet computer, a laptop computer, a personal digital assistant (PDA), a navigation device, a wearable device, a smart bracelet, and a fixed terminal such as a desktop computer. Figure 1 , the data backup storage method may include the following steps:

[0042] Step S110. In response to the data storage request, determine the first target data in the data storage request, and use the number of data copies of the first target data as the target number.

[0043] In some exemplary embodiments of the present disclosure, the data storage request may be a request generated by a user operating a client of data backup storage when the user needs to perform data backup. The first target data may be the target data to be backed up and stored corresponding to the data storage request, and the first target data may be various types of files, for example, including but not limited to text files, audio files, video files, database files, etc.

[0044] The number of data copies may be the number of data copies that need to be backed up for the first target data in this data storage request, and the number of data copies may be a positive integer greater than 1. For example, the number of data copies may be 3, 5, etc. The number of targets may be the number of storage devices used to store the first target data, and the number of targets is equal to the number of data copies. For example, when the number of data copies is 3, the number of targets is also 3.

[0045] When a data storage request is received, the data storage request is responded to and the first target data in the data storage request and the number of data copies required for backup storage this time are determined, so as to determine the number of storage units required for this storage based on the number of data copies.

[0046] It should be noted that in other exemplary embodiments, the number of data copies of the target data may be determined according to specific storage requirements so as to store the data copies of the target data, and the present disclosure does not impose any special limitation on this.

[0047] According to some exemplary embodiments of the present disclosure, a fault domain level is determined; a fault subdomain corresponding to the fault domain is determined according to the fault domain level; and an intermediate storage unit corresponding to the fault subdomain is determined. A fault domain generally refers to a group of servers, storage, and / or network connection components that are collectively affected by a fault. For example, a fault domain may be a server rack. When a fault domain is divided into server racks, if a top-of-rack switch or a power distribution device of a server rack fails, all servers in the rack will go offline, even if the server hardware is operating normally. That is, the server rack can be regarded as a fault domain.

[0048] The fault domain level can be a pre-configured division of fault domains for data backup storage, and the division of fault domains can be designed based on the physical location and physical facilities of the data center. For example, the storage unit of the data center can be divided from top to bottom into logical root nodes (root), regions in geographical locations (referred to as regions, regions), data centers (DCs), rooms in data centers (rooms), independent power supply units (PDUs), cabinets (racks), layers in cabinets (layers), servers (servers), disks, and other levels.

[0049] refer to Figure 2 , the relationship between each level can be: a logical root node 210 may include multiple areas 220, an area 220 may include multiple data centers 230, a data center 230 may include multiple rooms 240, a room 240 includes multiple independent power supply units 250, an independent power supply unit 250 may include multiple cabinets 260, a cabinet 260 may include multiple cabinet compartments 270, a cabinet compartment 270 may include multiple servers 280, a server 280 may include multiple disks 290, and the target data is stored in the disks.

[0050] The relationship between the above storage units may be that a storage unit (storage node or storage device) in each level is a child node of a storage node in the previous level, and is a parent node of a storage node in the next level.

[0051] A fault subdomain may be a virtual area included in a fault domain. For example, a room 240 and multiple storage nodes included therein may constitute a fault subdomain, and a fault subdomain may include multiple intermediate storage units. An intermediate storage unit may be one or more of a region, a data center, a room in a data center, an independent power supply unit, a cabinet, a compartment in a cabinet, and a server.

[0052] In addition, in order to distinguish different storage units, different storage units can be numbered. For example, server_id(x), layer_id(x), rack_id(x), pdu_id(x), room_id(x), dc_id(x), and region_id(x) can be used to represent the numbers corresponding to different servers, compartments in cabinets, cabinets, independent power supply units, rooms in data centers, data centers, and regions, respectively.

[0053] According to another exemplary embodiment of the present disclosure, a basic storage unit for storing data and device information of the basic storage unit are determined; wherein the device information includes device type and current storage capacity; a basic device weight of the basic storage unit is determined based on the device information; and an intermediate device weight of each intermediate storage unit is determined based on the basic device weight; wherein the basic device weight and the intermediate device weight are included in the device weight.

[0054] The basic storage unit may be a storage medium for storing target data. Since the target data is stored in a disk, the basic storage unit may be a disk. The device information may be relevant information of the basic storage unit. For example, the device information may include but is not limited to the device type and current storage capacity. The device type may be the type corresponding to the storage unit. For example, the device type may include but is not limited to a mechanical hard disk drive (HDD), a solid state drive (SSD), a hybrid hard disk (HHD), and the like.

[0055] The current storage capacity may be the currently available storage capacity of the basic storage unit. As target data is stored in the storage unit or deleted from the storage unit, the capacity of the storage unit will change accordingly. Therefore, it is necessary to determine the currently available storage capacity of the storage unit during this data storage.

[0056] The basic device weight can be the corresponding weight of the basic storage unit in the entire storage system. For example, the basic device weight can be determined according to the current storage capacity of the basic storage unit. The larger the current storage capacity of the basic storage unit, the larger the corresponding basic device weight. For example, when the current storage capacity of the basic storage unit is 10T, the basic device weight can be set to 1; when the current storage capacity of the basic storage unit is 20T, the basic device weight can be set to 2, and so on. Since it can be determined that the basic storage unit is a disk, disk_id(x)[weight] is used to represent the weight of the disk.

[0057] In addition, the device weight of the basic storage unit can be determined based on the demand for data storage speed and the device type. For example, the basic device weight can be determined based on the data reading speed of the basic storage unit. The faster the data reading and writing speed of the basic storage unit, the larger the corresponding basic device weight value. For example, when the device type of the basic storage unit is a mechanical hard disk and the write speed of the mechanical hard disk is 50M / s, the device weight of the mechanical hard disk can be set to 1; when the device type of the basic storage unit is a solid-state hard disk and the write speed of the solid-state hard disk is 150M / s, the device weight of the solid-state hard disk can be set to 3.

[0058] It is easy for those skilled in the art to understand that when storing data, the device weight value of the basic storage unit can be set in advance according to the device information of the basic device unit, so as to determine the storage device for storing the target data according to the device weight value, and the present disclosure does not make any special limitations.

[0059] The intermediate device weight can be the corresponding weight of the intermediate storage unit in the entire storage system. After the basic device weight is determined, the intermediate device weight can be determined based on the basic device weight. For example, since the server is composed of disks, the weight of the server is the sum of the weights of the disks it owns. Server_id(x)[weight] is used to represent the server weight. Similarly, the weight of the upper-level element is equal to the sum of the weights of all child elements of the upper-level element. Use layer_id(x)[weight], rack_id(x)[weight], pdu_id(x)[weight], room_id(x)[weight], dc_id(x)[weight], and region_id(x)[weight] to represent Figure 2 The device weights for different cabinet compartments, cabinets, independent power supply units, data center rooms, data centers, and regions in the storage system.

[0060] Step S120: Obtain the device weight of the storage unit and the pre-configured fault domain level.

[0061] In some exemplary embodiments of the present disclosure, the device weight may include an intermediate device weight and a basic device weight. The fault domain level may be a preconfigured level of a fault domain for data backup storage. After obtaining the device weight and the fault domain level, a storage unit for storing the first target data may be determined in a plurality of different fault domains according to the device weight and the fault domain level, so as to store the first target data in the storage unit.

[0062] Step S130. Determine a target number of first storage units in combination with device weights and fault domain levels; wherein each first storage unit is distributed in a different fault domain.

[0063] In some exemplary embodiments of the present disclosure, the target number may be the number of first storage units. The first storage unit may be a storage unit for storing first target data. Multiple first storage units may be determined in combination with device weights and fault domain levels, and the multiple first storage units are respectively distributed in different fault domains, so that data backup storage can achieve a cross-fault domain effect.

[0064] According to some exemplary embodiments of the present disclosure, a first data identifier of the first target data and a first device identifier of the storage unit are determined; a first storage unit is determined in each of the target number of fault domains according to the first data identifier, the first device identifier and the device weight. The first data identifier may be an identifier used to distinguish different first target data. Since different data storage requests may correspond to different first target data, different first target data may be distinguished. For example, when the first target data is x, data_id(x) may be used to represent the first target data x. The first device identifier may be an identifier used to uniquely mark each storage unit. For example, when a disk is a device for storing target data, disk_id(x) may be used to represent the device identifiers of different disks. Device weights include intermediate device weights and basic device weights.

[0065] After determining the first data identifier, the first device identifier, and the device weight, the first data identifier, the first device identifier, and the device weight can be calculated to determine the target number of first storage units. For example, all storage units can be sorted from large to small according to the weight value based on the first data identifier, the first device identifier, and the device weight, and the first target number of storage units can be selected; taking a storage unit selected this time as an example, the target number of storage units at the next level of the storage unit can be determined; and so on, until the target number of first storage units is determined, the entire device determination process ends.

[0066] According to another exemplary embodiment of the present disclosure, an intermediate operation result is obtained after a hash operation is performed on the first data identifier, the first device identifier, and the device weight; and a first storage unit is determined in each of the target number of fault domains according to the intermediate operation result. The intermediate operation result can be the device identifiers corresponding to the target number of first storage units determined after a hash operation is performed on the first data identifier, the first device identifier, and the device weight. According to the device identifiers corresponding to the target number of first storage units, the first target data can be stored in each first storage unit respectively.

[0067] For example, when the fault domain is set to a data center and the number of data copies is 3, the specific process of data backup storage is as follows.

[0068] (1) Since the fault domain is a data center, to achieve data storage across fault domains, multiple data copies need to be stored in different data centers, and these different data centers belong to the same region. Calculate Hash(data_id(x), region_id(n))×region_id(n)[weight] and (region_id(n)∈root), and take the region_id(m) corresponding to the maximum value from the above calculation results. This step indicates that all copies of the first target data x are stored in one region.

[0069] (2) Calculate Hash(data_id(x),dc_id(n))×dc_id(n)[weight] and (dc_id(n)∈region_id(m)). Since the failure domain is the data center and the number of data copies is 3, the three largest values ​​corresponding to dc_id(m1), dc_id(m2), and dc_id(m3) are taken from the calculation results of this step. This step indicates that the three copies of the first target data x are stored in three different data centers in the same region, which is consistent with the requirements.

[0070] (3) Calculate Hash(data_id(x), room_id(n))×room_id(n)[weight] and (room_id(n)∈dc_id(m1)), and take the room_id(m1) corresponding to the maximum value from the calculation result; calculate Hash(data_id(x), room_id(n))×room_id(n)[weight] and (room_id(n)∈dc_id(m2)), and take the room_id(m2) corresponding to the maximum value from the calculation result; calculate Hash(data_id(x), room_id(n))×room_id(n)[weight] and (room_id(n)∈dc_id(m3)), and take the room_id(m3) corresponding to the maximum value from the calculation result. This step can represent selecting a room from each of the three data centers to store the first target data x.

[0071] (4) Calculate Hash(data_id(x),pdu_id(n))×pdu_id(n)[weight] and (pdu_id(n)∈room_id(m1)), and take the pdu_id(m1) corresponding to the maximum value from the result; calculate Hash(data_id(x),pdu_id(n))×pdu_id(n)[weight] and (pdu_id(n)∈room_id(m2)), and take the pdu_id(m2) corresponding to the maximum value from the result; calculate Hash(data_id(x),pdu_id(n))×pdu_id(n)[weight] and (pdu_id(n)∈room_id(m3)), and take the pdu_id(m3) corresponding to the maximum value from the result. This step indicates that an independent power supply unit is selected in each room for storing the first target data x.

[0072] (5) Calculate Hash(data_id(x), rack_id(n))×rack_id(n)[weight] and (rack_id(n)∈pdu_id(m1)), and take the rack_id(m1) corresponding to the maximum value from the result; calculate Hash(data_id(x), rack_id(n))×rack_id(n)[weight] and (rack_id(n)∈pdu_id(m2)), and take the rack_id(m2) corresponding to the maximum value from the result; calculate Hash(data_id(x), rack_id(n))×rack_id(n)[weight] and (rack_id(n)∈pdu_id(m3)), and take the rack_id(m3) corresponding to the maximum value from the result. This step indicates that a cabinet is selected in each independent power supply unit for storing the first target data x.

[0073] (6) Calculate Hash(data_id(x), layer_id(n))×layer_id(n)[weight] and (layer_id(n)∈rack_id(m1)), and take the layer_id(m1) corresponding to the maximum value from the result; calculate Hash(data_id(x), layer_id(n))×layer_id(n)[weight] and (layer_id(n)∈rack_id(m2)), and take the layer_id(m2) corresponding to the maximum value from the result; calculate Hash(data_id(x), layer_id(n))×layer_id(n)[weight] and (layer_id(n)∈rack_id(m3)), and take the layer_id(m3) corresponding to the maximum value from the result. This step indicates that a compartment is selected in each cabinet for storing the first target data x.

[0074] (7) Calculate Hash(data_id(x), server_id(n))×server_id(n)[weight] and (server_id(n)∈layer_id(m1)), and take the server_id(m1) corresponding to the maximum value from the result; calculate Hash(data_id(x), server_id(n))×server_id(n)[weight] and (server_id(n)∈layer_id(m2)), and take the server_id(m2) corresponding to the maximum value from the result; calculate Hash(data_id(x), server_id(n))×server_id(n)[weight] and (server_id(n)∈layer_id(m3)), and take the server_id(m3) corresponding to the maximum value from the result. This step indicates that a server is selected in each layer to store the first target data x.

[0075] (8) Calculate Hash(data_id(x), disk_id(n))×disk_id(n)[weight] and (disk_id(n)∈server_id(m1)), and take the disk_id(m1) corresponding to the maximum value from the result; calculate Hash(data_id(x), disk_id(n))×disk_id(n)[weight] and (disk_id(n)∈server_id(m2)), and take the disk_id(m2) corresponding to the maximum value from the result; calculate Hash(data_id(x), disk_id(n))×disk_id(n)[weight] and (disk_id(n)∈server_id(m3)), and take the disk_id(m3) corresponding to the maximum value from the result. This step means writing the three copies of the first target data x into the calculated disk_id(m1), disk_id(m2), and disk_id(m3), respectively.

[0076] After hashing the first data identifier, the first device representation, and the device weight, multiple first storage units can be determined. In this process, the hashing can ensure randomness, so that the calculation result each time does not select the storage unit with the largest weight, thereby avoiding the situation where some devices are particularly idle and some devices are particularly busy, and the data is unevenly distributed. In addition, by adding the weight calculation, more storage units with larger device weight values ​​can appear in the calculation result.

[0077] Through the above calculation steps, three first storage units storing the first target data can be determined. These three first storage units are distributed in different fault domains. Therefore, the three data copies of the first target data are stored in the three first storage units respectively, so the effect of cross-fault domain data storage can be achieved. When a node in a fault domain fails, it will not affect the user's acquisition of target data from other first storage units.

[0078] Step S140: Store the first target data in each first storage unit respectively.

[0079] In some exemplary embodiments of the present disclosure, after determining multiple first storage units, the first target data can be stored in each first storage unit respectively, that is, the first target data is stored in a target number of first storage units respectively, so that the target data can be obtained from any first storage unit subsequently.

[0080] According to some exemplary embodiments of the present disclosure, in response to a data acquisition request, the second target data in the data acquisition request and the second data identifier corresponding to the second target data are determined; multiple second storage units corresponding to the second data identifier are determined; and the second target data is acquired from any second storage unit. The data acquisition request may be a request generated by a user when performing a data acquisition operation on a client. The second target data may be the data to be acquired in this data acquisition request, and the type of the second target data is the same as the type of the first target data. The second data identifier may be an identifier for marking the second target data. For example, when the second target data is y, data_id(y) may be used to represent the second target data. The second storage unit may be a device on which the second target data is stored.

[0081] When a data acquisition request is received, in response to the data acquisition request, the second target data and the second data identifier in the data acquisition request are determined, a plurality of second storage units storing the second target data are determined through the second data identifier, and one second storage unit is selectively selected from the plurality of second storage units to read the second target data from the second storage unit.

[0082] According to another exemplary embodiment of the present disclosure, second device identifiers corresponding to the plurality of second storage units are determined; a second device identifier is randomly determined as a target device identifier; and second target data is obtained according to the target device identifier. The second device identifier may be an identifier used to uniquely mark each second storage unit. For example, when a disk is a device for storing target data, disk_id(y) may be used to represent the second device identifier.

[0083] For example, when the number of data copies is 3, 3 second storage units can be determined, and disk_id(n1), disk_id(n2), and disk_id(n3) are used to represent the 3 second storage units. A device identifier can be randomly determined from the three second device identifiers as the target device identifier. For example, disk_id(n2) can be determined as the target device identifier. After the target device identifier is determined, the second target data can be obtained from the second storage unit corresponding to the target device identifier according to the target device identifier.

[0084] In addition, when determining the target device identification, multiple optional options can be set according to specific usage requirements, for example, the optional options can be configured as: the priority access times are the most, the priority access times are the least, the preferred device identification number is the smallest, the preferred device identification number is the largest, etc., so that the target device identification can be determined in multiple ways.

[0085] It should be noted that the terms "first", "second", etc. used in the present disclosure are only for distinguishing different target data, different storage units, different data identifiers and different device identifiers, and should not impose any limitations on the present disclosure.

[0086] In summary, the data backup storage method disclosed in the present invention, first, in response to a data storage request, determines the first target data in the data storage request, and uses the number of data copies of the first target data as the target number; second, obtains the device weight of the storage unit and the pre-configured fault domain level; third, determines the target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is distributed in a different fault domain; and stores the first target data in each first storage unit respectively. Through the data backup storage method disclosed in the present invention, on the one hand, when a data storage request is received, the calculation process of determining the first storage unit storing the first target data can be completed on the client side, and there is no need to set a master control node for controlling data backup to specify the corresponding storage node, thereby realizing decentralized data storage and avoiding system performance and reliability bottlenecks. On the other hand, the first target data is stored in the determined multiple first storage units respectively. When a node in one of the fault domains fails, the user can still obtain data from the storage nodes in other fault domains, thereby realizing the data storage effect across fault domains. On the other hand, users can configure the fault domain level in advance and define a set of fault domain division standards with finer granularity. Users can use the fault domain flexibly when backing up data by pre-configuring the fault domain level. On the other hand, by combining device weights and hash calculations, the calculated hash value is random, so that the result of each operation does not determine the storage unit with the largest weight, avoiding some devices being particularly idle while others are particularly busy, making the distribution of data storage more even.

[0087] In addition, in this exemplary embodiment, a data backup storage device is also provided. Figure 3 The data backup storage device 300 may include a request response module 310 , an information acquisition module 320 , a device determination module 330 and a data storage module 340 .

[0088] Specifically, the request response module 310 can be used to respond to a data storage request, determine the first target data in the data storage request, and use the number of data copies of the first target data as the target number; the information acquisition module 320 can be used to obtain the device weight of the storage unit and the pre-configured fault domain level; the device determination module 330 can be used to determine the target number of first storage units in combination with the device weight and the fault domain level; wherein each first storage unit is respectively distributed in a different fault domain; the data storage module 340 can be used to store the first target data in each first storage unit respectively.

[0089] The data backup storage device 300 can determine the first target data and the number of its data copies in the data storage request, and obtain the pre-configured fault domain level and device weight of the storage unit. In combination with the fault domain level and the device weight, a first storage unit is determined in each of the target number of fault domains, and the first target data is stored in multiple first storage units respectively, thereby realizing decentralized and cross-fault domain data backup storage, and is an effective data backup storage device.

[0090] According to some exemplary embodiments of the present disclosure, Figure 4 , the information acquisition module 320 includes a fault domain configuration unit 410 .

[0091] Specifically, the fault domain configuration unit 410 may be used to determine a fault domain level; determine a fault subdomain corresponding to the fault domain according to the fault domain level; and determine an intermediate storage unit corresponding to the fault subdomain.

[0092] The fault domain configuration unit 410 may determine a fault domain level and a fault subdomain corresponding to the fault domain level, and further determine intermediate storage units belonging to the fault domain, so as to determine intermediate device weights of the intermediate storage units.

[0093] According to another exemplary embodiment of the present disclosure, referring to Figure 5 , the information acquisition module 510 also includes a weight configuration unit 520.

[0094] Specifically, the weight configuration unit 520 can be used to determine the basic storage unit for storing data and the device information of the basic storage unit; wherein the device information includes the device type and the current storage capacity; determine the basic device weight of the basic storage unit according to the device information; determine the intermediate device weight of each intermediate storage unit based on the basic device weight; wherein the basic device weight and the intermediate device weight are included in the device weight.

[0095] The weight configuration unit 520 may obtain device information of the basic storage unit, and determine the intermediate device weight of the intermediate storage unit according to the device information of the basic storage unit, so as to determine the storage unit for storing the target data based on the determined weight of the storage unit.

[0096] According to another exemplary embodiment of the present disclosure, referring to Figure 6 , the device determination module 330 may include a device determination unit 610 .

[0097] Specifically, the device determination unit 610 can be used to determine the first data identifier of the first target data and the first device identifier of the storage unit; and determine a first storage unit in each of the target number of fault domains according to the first data identifier, the first device identifier and the device weight.

[0098] The device determination unit 610 can obtain the first data identifier and the first device identifier, and determine a first storage unit in multiple different fault domains respectively through information such as the first data identifier, the first device identifier and the device weight, so as to store the first target data.

[0099] According to yet another exemplary embodiment of the present disclosure, referring to Figure 7 , the device determination unit 610 may include a device determination subunit 710.

[0100] Specifically, the device determination subunit 710 can be used to obtain an intermediate operation result after performing a hash operation on the first data identifier, the first device identifier and the device weight; and determine a first storage unit in each of the target number of fault domains according to the intermediate operation result.

[0101] The device determination subunit 710 may perform a hash operation on the first data identifier, the first device identifier, the device weight, etc. and obtain an intermediate operation result, and then determine a plurality of first storage units based on the obtained intermediate operation result.

[0102] In another exemplary embodiment of the present disclosure, a data backup storage device 800 is provided. Figure 8 The data backup storage device 800 may further include a data acquisition module 810 .

[0103] Specifically, the data acquisition module 810 can be used to respond to a data acquisition request, determine the second target data in the data acquisition request and the second data identifier corresponding to the second target data; determine multiple second storage units corresponding to the second data identifier; and acquire the second target data from any second storage unit.

[0104] The data acquisition module 810 can acquire the second target data and its second data identifier in the data acquisition request, and determine multiple second storage units corresponding to the second data identifier, that is, the storage units storing the second target data, and then acquire the second target data from any second storage unit.

[0105] According to some exemplary embodiments of the present disclosure, Fig. 9 , the data acquisition module 810 may include a data acquisition unit 910 .

[0106] Specifically, the data acquisition unit 910 can be used to determine the second device identifiers corresponding to the multiple second storage units respectively; randomly determine a second device identifier as the target device identifier; and acquire the second target data according to the target device identifier.

[0107] The data acquisition unit 910 may determine the second device identifiers corresponding to the plurality of second storage units respectively, and randomly determine a target device identifier from the plurality of second device identifiers, so as to acquire the second target data from the target storage unit corresponding to the target device identifier.

[0108] The specific details of each virtual data backup storage device module mentioned above have been described in detail in the corresponding data backup storage method, so they will not be repeated here.

[0109] It should be noted that, although several modules or units of the data backup storage device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0110] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0111] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0112] Refer to the following Fig.10 The electronic device 1000 according to such an embodiment of the present invention will be described. Fig.10 The electronic device 1000 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0113] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processing unit 1010, the at least one storage unit 1020, a bus 1030 connecting different system components (including the storage unit 1020 and the processing unit 1010), and a display unit 1040.

[0114] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0115] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022 , and may further include a read-only memory unit (ROM) 1023 .

[0116] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0117] Bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0118] The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1000, and / or communicate with any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via a bus 1030. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0119] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0120] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0121] refer to Fig.11 As shown, a program product 1100 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0122] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0123] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0124] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0125] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0126] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0127] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0128] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data backup storage method, characterized in that: include: In response to a data storage request, determining first target data in the data storage request, and taking the number of data copies of the first target data as a target number; Obtaining a device weight and a pre-configured fault domain level of a storage unit, wherein the fault domain level is determined according to the hierarchy of the storage unit in the data center, and the device weight is determined based on a basic device weight of a basic storage unit and an intermediate device weight of an intermediate storage unit; Determine a target number of first storage units in combination with the device weight and the fault domain level; wherein each of the first storage units is distributed in a different fault domain; The first target data are stored in each of the first storage units respectively.

2. The data backup storage method according to claim 1, characterized in that: Before, in response to the data storage request, determining the first target data in the data storage request and taking the number of data copies of the first target data as the target number, the method further includes: Determining the fault domain level; Determine, according to the fault domain level, a fault subdomain corresponding to the fault domain; An intermediate storage unit corresponding to the fault subdomain is determined.

3. The data backup storage method according to claim 2, characterized in that: The method further comprises: Determine a basic storage unit for storing data and device information of the basic storage unit; wherein the device information includes device type and current storage capacity; Determine a basic device weight of the basic storage unit according to the device information; The intermediate device weight of each intermediate storage unit is determined based on the basic device weight; wherein the basic device weight and the intermediate device weight are included in the device weight.

4. The data backup storage method according to claim 1, characterized in that: The determining of a target number of first storage units in combination with the device weight and the fault domain level includes: Determine a first data identifier of the first target data and a first device identifier of the storage unit; A first storage unit is respectively determined in the target number of fault domains according to the first data identifier, the first device identifier, and the device weight.

5. The data backup storage method according to claim 4, characterized in that: The determining of the first storage unit in the target number of fault domains according to the first data identifier, the first device identifier, and the device weight respectively includes: Performing a hash operation on the first data identifier, the first device identifier, and the device weight to obtain an intermediate operation result; A first storage unit is respectively determined in the target number of fault domains according to the intermediate calculation result.

6. The data backup storage method according to claim 1, characterized in that: After storing the first target data in each of the first storage units respectively, the method further includes: In response to a data acquisition request, determining second target data in the data acquisition request and a second data identifier corresponding to the second target data; Determining a plurality of second storage units corresponding to the second data identifier; The second target data is obtained from any one of the second storage units.

7. The data backup storage method according to claim 6, characterized in that: The acquiring the second target data from any one of the second storage units comprises: Determine second device identifiers corresponding to the plurality of second storage units respectively; Randomly determine a second device identifier as a target device identifier; The second target data is acquired according to the target device identifier.

8. A data backup storage device, characterized in that: include: a request response module, configured to determine, in response to a data storage request, first target data in the data storage request, and use the number of data copies of the first target data as a target number; An information acquisition module, used to acquire a device weight of a storage unit and a pre-configured fault domain level, wherein the fault domain level is determined according to the hierarchy of the storage unit in the data center, and the device weight is determined based on a basic device weight of a basic storage unit and an intermediate device weight of an intermediate storage unit; A device determination module, configured to determine a target number of first storage units in combination with the device weight and the fault domain level; wherein each of the first storage units is distributed in a different fault domain; A data storage module is used to store the first target data in each of the first storage units respectively.

9. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the data backup storage method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data backup storage method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method of data migration, controller and data migration apparatus

    CN104583930A

  • Fault domain technology-based data management method and apparatus

    CN107085546A