WO2016091072A1 - 分布式数据存储方法及分布式数据集群系统 - Google Patents

分布式数据存储方法及分布式数据集群系统 Download PDF

Info

Publication number
WO2016091072A1
WO2016091072A1 PCT/CN2015/095580 CN2015095580W WO2016091072A1 WO 2016091072 A1 WO2016091072 A1 WO 2016091072A1 CN 2015095580 W CN2015095580 W CN 2015095580W WO 2016091072 A1 WO2016091072 A1 WO 2016091072A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
piece
node servers
data node
original
Prior art date
Application number
PCT/CN2015/095580
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 北京奇虎科技有限公司
Publication of WO2016091072A1 publication Critical patent/WO2016091072A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present invention relates to the field of computer network technologies, and in particular, to a distributed data storage method and a distributed data cluster system.
  • the traditional data storage system uses a centralized storage server to store all data.
  • the storage server becomes a bottleneck of system performance, and is also the focus of reliability and security, and cannot meet the needs of large-scale storage applications.
  • the distributed data storage system adopts a scalable system structure, which utilizes multiple storage servers to share storage load and utilizes location servers to locate storage information. It not only improves system reliability, availability and access efficiency, but also is easy to expand.
  • a distributed data storage system is a cluster system with many data nodes, and each data node can be understood as a data storage server.
  • a cluster system has six data nodes, and each data node is equivalent to a physical server. This document is called a data node server.
  • a data node server When doing data storage, storing several pieces of data into corresponding data nodes is the core concept of a distributed data storage system.
  • the existing distributed data storage strategy is that when multiple pieces of data are received, all of the data is stored on one of the data nodes, and other backups of the data are separately stored on other data nodes.
  • replication is to mirror multiple data in Node_1 to Node_2 and Node_3, and Node_1, Node_2 and Node_3 have correlation.
  • Node_3 Node_1 and Node_2 are required to replace it.
  • Help Node_3 complete the work it needs to do. Due to the correlation of the data, the work of Node_3 is distributed to Node_1 and Node_2. The problem is that when Node_3 is down, Node_4, Node_5 and Node_6 do not feel Node_3 down, only Node_1 and Node_2 have this pressure.
  • the present invention has been made in order to provide a distributed data clustering system and corresponding distributed data storage method that overcomes the above problems or at least partially solves the above problems.
  • a distributed data storage method comprising:
  • the first group of K+1 data node servers are not identical to the second group of K+1 data node servers, K is an integer greater than or equal to 1, and N is an integer greater than K+1.
  • a distributed data storage method comprising:
  • the M pieces of data are divided into N sets of data, and the originals of the N sets of data are respectively stored in N data node servers, N is an integer greater than 1, and the original of each set of data is stored only in one data node server. ;
  • the i-th group data is divided into D group data, and D is an integer greater than or equal to 1, each will K copies of all data in the group are stored in the N data node servers except the ith number
  • K is an integer greater than or equal to 1
  • L is not less than K
  • N is not less than K +1.
  • a distributed data cluster system comprising: a plurality of data node servers;
  • a data receiver adapted to receive at least two data to be stored
  • a memory configured to store the original of the first piece of data and the K copy of the at least two pieces of data into a first group of K+1 data node servers of the N data node servers, wherein the first Each of the group K+1 data node servers stores an original of the first piece of data and one of the K copies; and an original of the second piece of data of the at least two pieces of data and K shares
  • the replicas are respectively stored in a second group of K+1 data node servers of the N data node servers, wherein each of the second group K+1 data node servers stores the second strip An original of the data and one of the K copies; wherein the first group of K+1 data node servers are not identical to the second group of K+1 data node servers, and K is an integer greater than or equal to , N is an integer greater than K+1.
  • a computer program comprising computer readable code causing a computing device to perform the distributed data storage method described above when the computer readable code is run on a computing device.
  • a computer readable medium storing the above computer program is provided.
  • the core idea of the distributed data storage method and the data storage strategy of the distributed data cluster system provided by the present invention is to destroy as much as possible the original of the data in the prior art and the relevance of the copy storage.
  • the original The data node servers that are stored by their replicas are not identical.
  • the other data node servers of the cluster should be equally burdened with service pressure to avoid a large impact on certain specific data node servers.
  • FIG. 1 shows a flow chart of a distributed data storage method in accordance with one embodiment of the present invention
  • FIG. 2 shows a flow chart of a distributed data storage method in accordance with another embodiment of the present invention
  • FIG. 3 is a block diagram showing the functional structure of a distributed data cluster system according to an embodiment of the present invention.
  • Figure 4 is a schematic block diagram of a computing device for performing a distributed data storage method in accordance with the present invention
  • Fig. 5 schematically shows a storage unit for holding or carrying program code implementing a distributed data storage method according to the present invention.
  • FIG. 1 shows a flow chart of a distributed data storage method in accordance with one embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • Step S101 Receive at least two pieces of data to be stored.
  • the distributed data cluster system of the present invention After receiving the data to be stored, the distributed data cluster system of the present invention stores data in a storage space as data in units of bars.
  • M is used to indicate the number of received data to be stored.
  • the method may select N data node servers from multiple data node servers as data segments for storing the data according to the data size of the at least two data. Point server.
  • the total number of data node servers is not limited. Some cluster systems are large in scale and have many data nodes. Some cluster systems are small in scale and relatively few in data nodes.
  • the amount of data is also uncertain. In general, if the amount of data received is relatively large, more data node servers should be selected to store the data. If the amount of data received is relatively small, fewer data node servers should be selected to store the data. Therefore, the method can select the number of data node servers storing the data according to the size of the data volume, and N denotes the number of data node servers storing the data.
  • Step S102 storing the original of the first piece of data and the K copy of the at least two pieces of data into a first group of K+1 data node servers of the N data node servers, wherein the first group of K+1 Each of the data node servers stores an original of the first piece of data and one of the K copies.
  • Step S103 storing the original of the second piece of data and the K copy of the at least two pieces of data into a second group of K+1 data node servers of the N data node servers, wherein the second group of K+1 Each of the data node servers stores an original of the second piece of data and one of the K copies.
  • the first group of K+1 data node servers are not identical to the second group of K+1 data node servers, K is an integer greater than or equal to 1, and N is greater than K+1. Integer.
  • each piece of data When storing M pieces of data, each piece of data may be sequentially stored according to the sorting, or each group of data may be sequentially stored after grouping, and the M pieces of data may be simultaneously stored.
  • the above steps S102 and S103 are used to describe the storage manner of two of the M data, and the execution order of the two steps may be in no particular order.
  • the first piece of data and the second piece of data do not specifically refer to the two pieces of data ranked first in the M pieces of data, but refer to two pieces of data in the M pieces of data, which may be any two pieces of data.
  • step S102 the original of the first piece of data and the K copy are respectively stored in the first group of K+1 data node servers.
  • the original copy and the K copy are added together to store K+1 shares, and each of the first group of K+1 data node servers is used to store one of them.
  • step S103 the original of the second piece of data is The K copies are stored in the second group of K+1 data node servers.
  • the original copy and the K copy are added together to store K+1 shares, and each of the second set of K+1 data node servers is used to store one of them.
  • the original of the first piece of data and the original of the second piece of data are stored in the same data node server, and the K data node servers storing the K copies of the second piece of data and the first piece of storage are stored.
  • the original of the first piece of data and the original of the second piece of data are stored in the same data node server, and the K data node servers storing the K copies of the second piece of data and the storage first
  • the K data node servers of the K copies of the strip data are partially different.
  • the original of the first piece of data and the original of the second piece of data are stored in different data node servers, and the K data node servers storing the K copies of the second piece of data and the storage first
  • the original of the first piece of data and the original of the second piece of data are stored in different data node servers, and the K data node servers storing the K copies of the second piece of data and the storage first
  • the second copy of the second piece of data is stored in two data node servers that are not identical to Node_2 and Node_3 except for the data node server that it is storing.
  • This method also destroys the specification of the two data must be stored to the same data node server and the relevance of the data storage.
  • a data node server has a problem, as many other data node servers as the cluster together Service pressure to avoid a large impact on a few specific data node servers.
  • the location server records and locates the storage location information of all data to ensure the availability of the system.
  • the core idea of the distributed data storage method provided by this embodiment is to destroy the originality of the original data and the copy storage in the prior art as much as possible.
  • the original and the copy thereof are The stored data node servers are not identical. If the technical effect of the method is further improved, the data node stored in as many data originals and their copies can be served.
  • the servers are not identical, that is, the data is stored in a plurality of data node servers as much as possible.
  • a technical effect of a most preferred embodiment is that when there is a problem with any one of the N data node servers, the other N-1 data node servers of the cluster jointly bear the service pressure to avoid Several specific data node servers have a large impact.
  • FIG. 2 shows a flow chart of a distributed data storage method in accordance with another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step S201 receiving M pieces of data to be stored, where M is an integer greater than 1.
  • the distributed data cluster system of the present invention After receiving the data to be stored, the distributed data cluster system of the present invention stores data in a storage space as data in units of bars.
  • M is used to indicate the number of received data to be stored.
  • the method may further select, according to the data size of the M pieces of data, N data node servers from the plurality of data node servers as the data node server storing the data.
  • the total number of data node servers is not limited. Some cluster systems are large in scale and have many data nodes. Some cluster systems are small in scale and relatively few in data nodes.
  • the amount of data is also uncertain. In general, if the amount of data received is relatively large, more data node servers should be selected to store the data. If the amount of data received is relatively small, fewer data node servers should be selected to store the data. Therefore, the method can select the number of data node servers storing the data according to the size of the data volume, and N denotes the number of data node servers storing the data.
  • Step S202 the M pieces of data are divided into N sets of data, and the originals of the N sets of data are respectively stored in N data node servers, N is an integer greater than 1, and the original of each set of data is stored only in one data node server. in.
  • the M data can be divided into N groups, and the difference between the two groups of data is less than or equal to a preset value, and the preset value can be flexibly set according to actual conditions, and the purpose is to exhaust
  • the originals of the N sets of data are separately stored into N data node servers, each of which stores the original of a set of data.
  • Step S203 for the i-th data node server storing the original of the i-th data, i ⁇ [1, N], dividing the i-th data into data of D packets, and D is an integer greater than or equal to 1, K copies of all data in each group are stored in any of the N data node servers except for the i-th data node server, and any two copies of each piece of data in the group are not in the same data.
  • K is an integer greater than or equal to 1
  • L is not less than K
  • N is not less than K+1.
  • step S203 After storing the original of each set of data to the corresponding data node server, the storage of the K copies of each set of data is completed in step S203. Specifically, taking the first data node server as an example, the data node server stores the first group of data. In this step, the first group of data is divided into D grouped data, and then K shares of all data of each group are divided. The copy is stored in any of the N data node servers except for the i-th data node server. The group data other than the first group data is also stored in the above manner. After storing the K copies of all the data for each packet, adjustments can be made such that any two copies of each piece of data in the packet are not in the same data node server.
  • the L data node servers corresponding to different groups of stored data copies are completely different.
  • the L data node servers stored by the copies of the different grouped data are completely different.
  • the L data node servers stored in the replica are completely different.
  • the 1000 pieces of data are first divided into 10 groups, and each group has 100 pieces of data.
  • each group has 100 pieces of data.
  • the 100 pieces of data are preferably equally divided into 4 groups to obtain 25 of each group.
  • the L data node servers that correspond to differently grouped copies of stored data are different.
  • the L data node server portions stored by the copies of the different grouped data are different.
  • any group of data can be divided into A copy of each packetized data is then stored in the L data node servers, and the L data node server portions of the different packetized data stores are different.
  • the 1024 pieces of data are first divided into 6 groups, each group having 170 or 171 pieces of data.
  • the groups of data further divide it into Grouping, getting about 17 data per packet.
  • select L 2 data node servers to store 2 copies of the data of the group among the 5 data node servers except the data node server stored by the original, and there are 10 kinds of selection methods.
  • Each group selects one of the selection methods for storage, so that the two data node servers stored in the copies of the different grouped data are not identical, and any two copies of each piece of data in the same group are not in the same data node server.
  • the location server records and locates the storage location information of all data to ensure the availability of the system.
  • the M pieces of data are divided into N groups of data, and the originals of the N sets of data are respectively stored in the N data node servers; then, the data of each group is further divided into D Grouped data, storing K copies of each grouped data into any L data node servers of the N data node servers except the data node server stored by the original, and any of the data in the group The two copies are not in the same data node server.
  • the original of the data in the prior art and the correlation of the copy storage thereof are destroyed.
  • the data node servers stored in as many data copies and their copies are not identical, that is, the data is stored in multiple data node servers as much as possible.
  • the other N-1 data node servers of the cluster jointly bear the service pressure to avoid a large impact on a certain specific data node server. .
  • the distributed data cluster system includes: a plurality of data node servers 310 and a data receiver 320, a memory 330; and optionally, a selector 340.
  • the data receiver 320 is adapted to receive at least two data to be stored.
  • the selector 340 is adapted to select N data node servers from the plurality of data node servers as the data node servers storing the data according to the data size of the at least two data.
  • the total number of data node servers is not limited. Some cluster systems are large in scale and have many data nodes. Some cluster systems are small in scale and relatively few in data nodes.
  • the amount of data is also uncertain. In general, if the amount of data received is relatively large, more data node servers should be selected to store the data. If the received data is relatively small, fewer data node servers should be selected to store the data. Therefore, the cluster system may include a selector 340 for selecting the number of data node servers storing the data according to the received data size of the at least two pieces of data.
  • the memory 330 is adapted to store the original of the first piece of data and the K copy of the at least two pieces of data into a first group of K+1 data node servers of the plurality of data node servers 310, wherein the first group K
  • Each of the +1 data node servers stores one of the original of the first piece of data and one of the K copies; and stores the original of the second piece of data and the K copies of the at least two pieces of data respectively Among the second group K+1 data node servers of the plurality of data node servers 310, wherein each of the second group K+1 data node servers stores the original of the second data and the K copies.
  • K is an integer greater than or equal to 1
  • the number of the plurality of data node servers is greater than K+ 1.
  • the memory 330 is specifically adapted to: store the original of the first piece of data and the original of the second piece of data into the same data node server, and store the K copy of the second piece of data.
  • the data node servers are completely different from the K data node servers that store the K copies of the first piece of data.
  • the memory 330 is specifically adapted to: store the original of the first piece of data and the original of the second piece of data into the same data node server, and store the K data node servers of the K copy of the second piece of data and The K data node servers that store the K copies of the first piece of data are different.
  • the memory 330 is specifically adapted to: store the original of the first piece of data and the original of the second piece of data into different data node servers, and store the K data node servers of the K copies of the second piece of data and The K data node servers that store the K copies of the first piece of data are completely different.
  • the memory 330 is specifically adapted to: store the original of the first piece of data and the original of the second piece of data into different data node servers, and store the K data node servers of the K copies of the second piece of data and The K data node servers that store the K copies of the first piece of data are different.
  • the memory 330 is further adapted to:
  • the M pieces of data are divided into N sets of data, and the originals of the N sets of data are respectively stored in N data node servers, N is an integer greater than 1, and the original of each set of data is stored only in one data node server;
  • the i-th data node server For the i-th data node server storing the original of the i-th data, i ⁇ [1, N], the i-th data is divided into D packets of data, and D is an integer greater than or equal to 1, each packet is The K copies of all the data are stored in any of the N data node servers except for the i-th data node server, and any two copies of each piece of data in the group are not in the same data node server.
  • K is an integer greater than or equal to 1
  • L is not less than K
  • N is not less than K+1.
  • the L data node servers corresponding to different packets of the stored data are completely different; or the L data node servers corresponding to the different packets storing the copies of the data are different.
  • D [(N-1) / K].
  • the memory 330 is specifically adapted to: if M is a multiple of N, divide the M data into equal parts N group data; if M is not a multiple of N, the M data is divided into N groups of data, and the difference of the number of data of each two sets of data is less than or equal to a preset value.
  • the core idea of the data storage strategy of the distributed data cluster system provided in this embodiment is to destroy the originality of the data in the prior art and the relevance of the copy storage as much as possible.
  • the original and the copy thereof are stored.
  • the data node servers are not identical. If the technical effect of the system is further improved, the data node servers stored in as many data originals and their copies may not be identical, that is, the data storage is balanced in multiple data node servers as much as possible.
  • the other data node servers of the cluster should be equally burdened with service pressure to avoid a large impact on certain specific data node servers.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and To divide them into multiple sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of a distributed data cluster system in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 4 illustrates a computing device that can implement a distributed data storage method in accordance with the present invention.
  • the computing device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a storage device 420.
  • Storage device 420 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • Storage device 420 has a storage space 430 that stores program code 431 for performing any of the method steps described above.
  • storage space 430 storing program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include such as hard drives, compact discs (CDs), memory cards or soft A program code carrier such as a disk.
  • Such computer program products are typically portable or fixed storage units such as those shown in FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to storage device 420 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit comprises computer readable code 431' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 410, which when executed by the computing device causes the computing device Perform the various steps in the method described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种分布式数据存储方法及分布式数据集群系统。其中方法包括:接收待存储的至少两条数据;将上述数据中的第一条数据的正本以及K份副本分别存储到第一组K+1个数据节点服务器中;以及将上述数据中的第二条数据的正本以及K份副本分别存储到第二组K+1个数据节点服务器中;其中,第一组K+1个数据节点服务器与第二组K+1个数据节点服务器不完全相同。利用本发明提供的方案,当N个数据节点服务器中任一个数据节点服务器出现问题时,尽量由集群的其它数据节点服务器均衡地承担服务压力,以避免对某几个特定的数据节点服务器产生较大的影响。

Description

分布式数据存储方法及分布式数据集群系统 技术领域
本发明涉及计算机网络技术领域,具体涉及一种分布式数据存储方法及分布式数据集群系统。
背景技术
分布式数据存储系统就是将数据分散存储在多台独立的设备上。传统的数据存储系统采用集中的存储服务器存放所有数据,存储服务器成为系统性能的瓶颈,也是可靠性和安全性的焦点,不能满足大规模存储应用的需要。分布式数据存储系统采用可扩展的系统结构,利用多台存储服务器分担存储负荷,利用位置服务器定位存储信息,它不但提高了系统的可靠性、可用性和存取效率,还易于扩展。
分布式数据存储系统为具有很多数据节点的集群系统,每个数据节点可以理解为一个数据存储服务器。例如,集群系统具有6个数据节点,每个数据节点相当于一个物理的服务器,本文称为数据节点服务器。在做数据存储时,将若干条数据存储到对应的数据节点中,这是分布式数据存储系统核心的概念。
在分布式数据存储技术中还有复制的概念。集群系统作为一个整体,对外要保证其高可用性,集群中某些数据节点的损坏不会影响对外的服务。为了满足高可用性的目的,需要做复制。将一条数据在集群中放置多份,即多份冗余。当某一份数据出现问题或某个数据节点出现问题时,可以采用其它的份来补足,使得这个服务能继续进行。
现有的分布式数据存储策略是,当接收到多条数据时,将这些数据全部存储到某一个数据节点上,并将这些数据的其它备份分别存储到其它数据节点上。举例来说,对于数据节点Node_1,Node_2和Node_3,复制是将Node_1中多条数据分别镜像到Node_2和Node_3,Node_1,Node_2和Node_3的数据具有相关性。若Node_3出现问题,需要Node_1,Node_2来进行替换, 帮助Node_3完成它需要完成的工作。由于数据具有相关性,Node_3的工作都分摊给了Node_1和Node_2,这样所出现的问题是:当Node_3宕机时,Node_4,Node_5和Node_6感觉不到Node_3宕机,只有Node_1和Node_2具有这个压力。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的分布式数据集群系统和相应的分布式数据存储方法。
根据本发明的一个方面,提供了一种分布式数据存储方法,包括:
接收待存储的至少两条数据;
将所述至少两条数据中的第一条数据的正本以及K份副本分别存储到N个数据节点服务器中的第一组K+1个数据节点服务器中,其中所述第一组K+1个数据节点服务器中每一数据节点服务器存储所述第一条数据的正本以及K份副本其中之一;以及
将所述至少两条数据中的第二条数据的正本以及K份副本分别存储到所述N个数据节点服务器中的第二组K+1个数据节点服务器中,其中所述第二组K+1个数据节点服务器中每一数据节点服务器存储所述第二条数据的正本以及K份副本其中之一;
其中,所述第一组K+1个数据节点服务器与所述第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,N为大于K+1的整数。
根据本发明的另一方面,提供了一种分布式数据存储方法,包括:
接收待存储的M条数据,M为大于1的整数;
将M条数据分为N组数据,将所述N组数据的正本分别存储到N个数据节点服务器中,N为大于1的整数,且每一组数据的正本仅存储在一个数据节点服务器中;
对于存储第i组数据的正本的第i个数据节点服务器,i∈[1,N],将所述第i组数据分为D个分组的数据,D为大于或等于1的整数,将每个分组中所有数据的K份副本分别存储到所述N个数据节点服务器中除了第i个数 据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中,K为大于或等于1的整数,L不小于K,且N不小于K+1。
根据本发明的另一方面,提供了一种分布式数据集群系统,包括:多个数据节点服务器;以及
数据接收器,适于接收待存储的至少两条数据;
存储器,适于将所述至少两条数据中的第一条数据的正本以及K份副本分别存储到N个数据节点服务器中的第一组K+1个数据节点服务器中,其中所述第一组K+1个数据节点服务器中每一数据节点服务器存储所述第一条数据的正本以及K份副本其中之一;以及将所述至少两条数据中的第二条数据的正本以及K份副本分别存储到所述N个数据节点服务器中的第二组K+1个数据节点服务器中,其中所述第二组K+1个数据节点服务器中每一数据节点服务器存储所述第二条数据的正本以及K份副本其中之一;其中,所述第一组K+1个数据节点服务器与所述第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,N为大于K+1的整数。
根据本发明的又一个方面,提供一种计算机程序,其包括计算机可读代码,当计算机可读代码在计算设备上运行时,导致计算设备执行上述的分布式数据存储方法。
根据本发明的再一个方面,提供一种计算机可读介质,其中存储了上述计算机程序。
本发明提供的分布式数据存储方法及分布式数据集群系统的数据存储策略的核心思想是尽量破坏现有技术中数据的正本及其副本存储的相关性,对于其中两条数据来说,其正本及其副本所存储的数据节点服务器不完全相同。当N个数据节点服务器中任一个数据节点服务器出现问题时,尽量由集群的其它数据节点服务器均衡地承担服务压力,以避免对某几个特定的数据节点服务器产生较大的影响。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它 目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图概述
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的分布式数据存储方法的流程图;
图2示出了根据本发明另一个实施例的分布式数据存储方法的流程图;
图3示出了根据本发明一个实施例的分布式数据集群系统的功能结构框图;
图4示意性地示出了用于执行根据本发明的分布式数据存储方法的计算设备的框图;
图5示意性地示出了用于保持或者携带实现根据本发明的分布式数据存储方法的程序代码的存储单元。
本发明的较佳实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
图1示出了根据本发明一个实施例的分布式数据存储方法的流程图。如图1所示,该方法包括如下步骤:
步骤S101,接收待存储的至少两条数据。
本发明的分布式数据集群系统在接收到待存储的数据之后,以条为单位将数据存储到某一存储空间中作为数据。本文中用M来表示接收到的待存储数据的条数。可选地,本方法可以根据至少两条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储这些数据的数据节 点服务器。
对于不同的集群系统来说,数据节点服务器的总数是不限定的,有的集群系统的规模很大,数据节点也很多;而有的集群系统的规模较小,数据节点相对较少。而对于接收到的数据来说,其数据量也是不定的。一般来说,如果接收到的数据量比较大,则应选择较多的数据节点服务器存储这些数据,如果接收到的数据量比较小,则应选择较少的数据节点服务器存储这些数据。因此,本方法可根据数据量大小来选择存储这些数据的数据节点服务器的个数,本文中用N来表示存储这些数据的数据节点服务器的个数。
步骤S102,将上述至少两条数据中的第一条数据的正本以及K份副本分别存储到N个数据节点服务器中的第一组K+1个数据节点服务器中,其中第一组K+1个数据节点服务器中每一数据节点服务器存储第一条数据的正本以及K份副本其中之一。
步骤S103,将上述至少两条数据中的第二条数据的正本以及K份副本分别存储到N个数据节点服务器中的第二组K+1个数据节点服务器中,其中第二组K+1个数据节点服务器中每一数据节点服务器存储第二条数据的正本以及K份副本其中之一。
在上述步骤S102和步骤S103中,第一组K+1个数据节点服务器与第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,N为大于K+1的整数。
在存储M条数据时,可以依照排序依次存储每条数据,也可以分组后依次存储各个组的数据,还可以同时存储这M条数据。上述步骤S102和步骤S103用于说明M条数据中其中两条数据的存储方式,这两个步骤的执行顺序可不分先后。而且,上述第一条数据和第二条数据并非特指M条数据中排位靠前的两条数据,而是指的是M条数据中的两条数据,可以为任意的两条数据。
具体地,在步骤S102中,将第一条数据的正本以及K份副本分别存储到第一组K+1个数据节点服务器中。对于第一条数据来说,其正本与K份副本加起来共存储K+1份,第一组K+1个数据节点服务器中的每一数据节点服务器用于存储其中的一份。在步骤S103中,将第二条数据的正本以及 K份副本分别存储到第二组K+1个数据节点服务器中。对于第二条数据来说,其正本与K份副本加起来共存储K+1份,第二组K+1个数据节点服务器中的每一数据节点服务器用于存储其中的一份。
作为一种实施方式,第一条数据的正本和第二条数据的正本被存储到相同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器完全不同。举例来说,若N=6,K=2,第一条数据的正本和第二条数据的正本被存储到Node_1中,如果第一条数据的2份副本被存储到Node_2和Node_3中,那么第二条数据的2份副本只能被存储到Node_4,Node_5和Node_6中的任两个数据节点服务器中。在现有技术中,如果第一条数据的正本和第二条数据的正本被存储到Node_1中,第一条数据的2份副本被存储到Node_2和Node_3中,必然第二条数据的2份副本也被存储到Node_2和Node_3中。本方式破坏了现有技术中数据存储的相关性,使得存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器完全不同。当一个数据节点服务器出现问题时,由集群的尽可能多的其它数据节点服务器共同来承担服务压力,避免对某几个特定的数据节点服务器产生较大的影响。
作为另一种实施方式,第一条数据的正本和第二条数据的正本被存储到相同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器部分不同。举例来说,若N=6,K=2,第一条数据的正本和第二条数据的正本被存储到Node_1中,如果第一条数据的2份副本被存储到Node_2和Node_3中,那么第二条数据的2份副本可选择存储到与Node_2和Node_3部分不同的数据节点服务器中,如Node_2与Node_4,Node_5和Node_6中的任一个数据节点服务器,或者Node_3与Node_4,Node_5和Node_6中的任一个数据节点服务器。本方式也在一定程度上破坏了现有技术中数据存储的相关性,使得存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器部分不同。当一个数据节点服务器出现问题时,由集群的尽可能多的其它数据节点服务器共同来承担服务压力,避免 对某几个特定的数据节点服务器产生较大的影响。
作为另一种实施方式,第一条数据的正本和第二条数据的正本被存储到不同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器完全不同。举例来说,若N=6,K=2,第一条数据的正本被存储到Node_1中,第一条数据的2份副本被存储到Node_2和Node_3中,那么第二条数据的正本则被存储到除Node_1以外的其它任一数据节点服务器中,第二条数据的2份副本则被存储到除Node_2和Node_3、以及其正本所存储的数据节点服务器以外的其它任两个数据节点服务器中。这种方式破坏了两条数据的正本必须存储到同一数据节点服务器的规定以及数据存储的相关性,当一个数据节点服务器出现问题时,由集群的尽可能多的其它数据节点服务器共同来承担服务压力,避免对某几个特定的数据节点服务器产生较大的影响。
作为另一种实施方式,第一条数据的正本和第二条数据的正本被存储到不同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器部分不同。若N=6,K=2,第一条数据的正本被存储到Node_1中,第一条数据的2份副本被存储到Node_2和Node_3中,那么第二条数据的正本则被存储到除Node_1以外的其它任一数据节点服务器中,第二条数据的2份副本则被存储到除其正本所存储的数据节点服务器以外的与Node_2和Node_3不完全相同的两个数据节点服务器中。这种方式也破坏了两条数据的正本必须存储到同一数据节点服务器的规定以及数据存储的相关性,当一个数据节点服务器出现问题时,由集群的尽可能多的其它数据节点服务器共同来承担服务压力,避免对某几个特定的数据节点服务器产生较大的影响。
在本实施例提供的上述各种实施方式中,均利用位置服务器记录和定位所有数据的存储位置信息,保证系统的可用性。
由上述内容可知,本实施例提供的分布式数据存储方法的核心思想是尽量破坏现有技术中数据的正本及其副本存储的相关性,对于其中两条数据来说,其正本及其副本所存储的数据节点服务器不完全相同。如果进一步提升本方法的技术效果,可使尽可能多的数据正本及其副本所存储的数据节点服 务器不完全相同,即尽量使数据的存储在多个数据节点服务器中做均衡。一种最优选的实施方式的技术效果就是,当N个数据节点服务器中任一个数据节点服务器出现问题时,都由集群的其它N-1个数据节点服务器共同来承担服务压力,以避免对某几个特定的数据节点服务器产生较大的影响。
图2示出了根据本发明另一个实施例的分布式数据存储方法的流程图。如图2所示,该方法包括如下步骤:
步骤S201,接收待存储的M条数据,M为大于1的整数。
本发明的分布式数据集群系统在接收到待存储的数据之后,以条为单位将数据存储到某一存储空间中作为数据。本文中用M来表示接收到的待存储数据的条数。可选地,本方法还可以根据M条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储这些数据的数据节点服务器。
对于不同的集群系统来说,数据节点服务器的总数是不限定的,有的集群系统的规模很大,数据节点也很多;而有的集群系统的规模较小,数据节点相对较少。而对于接收到的数据来说,其数据量也是不定的。一般来说,如果接收到的数据数据量比较大,则应选择较多的数据节点服务器存储这些数据,如果接收到的数据数据量比较小,则应选择较少的数据节点服务器存储这些数据。因此,本方法可根据数据量大小来选择存储这些数据的数据节点服务器的个数,本文中用N来表示存储这些数据的数据节点服务器的个数。
步骤S202,将M条数据分为N组数据,将N组数据的正本分别存储到N个数据节点服务器中,N为大于1的整数,且每一组数据的正本仅存储在一个数据节点服务器中。
本步骤将M条数据分为N组,如果M是N的倍数,则优选地将M条数据分别等分为N组。举例来说,若M=1000,N=10,则将这1000条数据等分为10组,每组有100条数据。
如果M不是N的倍数,则可将M条数据分为N组,且每两组数据的条数差值小于或等于预设值,该预设值可根据实际情况灵活设置,其目的是尽 量使每个组的数据的数量相差不多。举例来说,若M=1024,N=6,则将这1024条数据分为6组,其中2组有170条数据,4组有171条数据,每两组的数据的条数差值小于或等于预设值1。
在将数据分组之后,将N组数据的正本分别存储到N个数据节点服务器中,每个数据节点服务器存储一组数据的正本。
步骤S203,对于存储第i组数据的正本的第i个数据节点服务器,i∈[1,N],将第i组数据分为D个分组的数据,D为大于或等于1的整数,将每个分组中所有数据的K份副本分别存储到N个数据节点服务器中除了第i个数据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中,K为大于或等于1的整数,L不小于K,且N不小于K+1。
在将每组数据的正本存储到对应的数据节点服务器之后,采用步骤S203完成各组数据的K份副本的存储。具体地,以第1个数据节点服务器为例,该数据节点服务器存储了第1组数据,本步骤将第1组数据分为D个分组的数据,然后将每个分组的所有数据的K份副本存储到N个数据节点服务器中除了第i个数据节点服务器以外的任意L个数据节点服务器中。除第1组数据以外的其它组数据也采取上述方式存储副本。在将每个分组的所有数据的K份副本存储完之后,可再进行调整,使得分组中每一条数据的任意两份副本不在同一数据节点服务器中。
作为一种实施方式,对应于不同分组的、存储数据的副本的L个数据节点服务器完全不同。对于任一组数据,将其进一步分为D个分组之后,不同分组的数据的副本所存储的L个数据节点服务器完全不同。具体地,可将任一组数据分为D组,例如D=[(N-1)/K],然后将每个分组的数据的副本存储到L个数据节点服务器中,不同分组的数据的副本所存储的L个数据节点服务器完全不同。
举例来说,若M=1000,N=10,K=2,则首先将这1000条数据等分为10组,每组有100条数据。对于其中任一组的100条数据,将其进一步分为D=[(10-1)/2]=4个分组,优选地将这100条数据等分4个分组,得到每个分组的25条数据。对于任一个分组的数据,在除了其正本所存储的数据节 点服务器以外的9个数据节点服务器中选取L=2个数据节点服务器存储该分组的数据的2份副本,并且不同分组的数据的副本所存储的2个数据节点服务器完全不同,同一分组中每一条数据的任意两份副本不在同一数据节点服务器中。
作为另一种实施方式,对应于不同分组的、存储数据的副本的L个数据节点服务器部分不同。对于任一组数据,将其进一步分为D个分组之后,不同分组的数据的副本所存储的L个数据节点服务器部分不同。具体地,可将任一组数据分为
Figure PCTCN2015095580-appb-000001
然后将每个分组的数据的副本存储到L个数据节点服务器中,不同分组的数据的副本所存储的L个数据节点服务器部分不同。
举例来说,若M=1024,N=6,K=2,则首先将这1024条数据分为6组,每组有170或171条数据。对于其中任一组的数据,将其进一步分为
Figure PCTCN2015095580-appb-000002
个分组,得到每个分组约为17条左右的数据。对于任一个分组的数据,在除了其正本所存储的数据节点服务器以外的5个数据节点服务器中选取L=2个数据节点服务器存储该分组的数据的2份副本,一共有10种选法,每个分组择取其中一种选法进行存储,使得不同分组的数据的副本所存储的2个数据节点服务器不完全相同,同一分组中每一条数据的任意两份副本不在同一数据节点服务器中。
需要说明的是,本发明中D的确定不仅限于上述两个公式D=[(N-1)/K]和
Figure PCTCN2015095580-appb-000003
D的值可根据数据节点服务器的数量进行合理设置,只要保证本发明的存储策略可实施即可。
在本实施例提供的上述各种实施方式中,均利用位置服务器记录和定位所有数据的存储位置信息,保证系统的可用性。
根据本实施例提供的分布式数据存储方法,将M条数据分为N组数据,将N组数据的正本分别存储到N个数据节点服务器中;然后,将每个组的数据进一步分为D个分组的数据,将每个分组的数据的K份副本存储到N个数据节点服务器中除了其正本所存储的数据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中。通过该方法破坏现有技术中数据的正本及其副本存储的相关性, 可使尽可能多的数据正本及其副本所存储的数据节点服务器不完全相同,即尽量使数据的存储在多个数据节点服务器中做均衡。当N个数据节点服务器中任一个数据节点服务器出现问题时,都由集群的其它N-1个数据节点服务器共同来承担服务压力,以避免对某几个特定的数据节点服务器产生较大的影响。
图3示出了根据本发明一个实施例的分布式数据集群系统的功能结构框图。如图3所示,该分布式数据集群系统包括:多个数据节点服务器310以及数据接收器320、存储器330;可选地,还包括:选择器340。
数据接收器320适于接收待存储的至少两条数据。
选择器340适于根据至少两条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储数据的数据节点服务器。
对于不同的集群系统来说,数据节点服务器的总数是不限定的,有的集群系统的规模很大,数据节点也很多;而有的集群系统的规模较小,数据节点相对较少。而对于接收到的数据来说,其数据量也是不定的。一般来说,如果接收到的数据量比较大,则应选择较多的数据节点服务器存储这些数据,如果接收到的数据比较小,则应选择较少的数据节点服务器存储这些数据。因此,集群系统中可包括选择器340,用于根据接收到的至少两条数据的数据量大小来选择存储这些数据的数据节点服务器的个数。
存储器330适于将上述至少两条数据中的第一条数据的正本以及K份副本分别存储到多个数据节点服务器310中的第一组K+1个数据节点服务器中,其中第一组K+1个数据节点服务器中每一数据节点服务器存储第一条数据的正本以及K份副本其中之一;以及,将上述至少两条数据中的第二条数据的正本以及K份副本分别存储到多个数据节点服务器310中的第二组K+1个数据节点服务器中,其中第二组K+1个数据节点服务器中每一数据节点服务器存储第二条数据的正本以及K份副本其中之一;其中,第一组K+1个数据节点服务器与第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,且多个数据节点服务器的个数大于K+1。
可选地,存储器330具体适于:将第一条数据的正本和第二条数据的正本存储到相同的数据节点服务器中,以及存储第二条数据的K份副本的K 个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器完全不同。
可选地,存储器330具体适于:将第一条数据的正本和第二条数据的正本存储到相同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器部分不同。
可选地,存储器330具体适于:将第一条数据的正本和第二条数据的正本存储到不同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器完全不同。
可选地,存储器330具体适于:将第一条数据的正本和第二条数据的正本存储到不同的数据节点服务器中,以及存储第二条数据的K份副本的K个数据节点服务器与存储第一条数据的K份副本的K个数据节点服务器部分不同。
可选地,存储器330还适于:
将M条数据分为N组数据,将N组数据的正本分别存储到N个数据节点服务器中,N为大于1的整数,且每一组数据的正本仅存储在一个数据节点服务器中;
对于存储第i组数据的正本的第i个数据节点服务器,i∈[1,N],将第i组数据分为D个分组的数据,D为大于或等于1的整数,将每个分组中所有数据的K份副本分别存储到N个数据节点服务器中除了第i个数据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中,K为大于或等于1的整数,L不小于K,且N不小于K+1。
具体地,对应于不同分组的、存储数据的副本的L个数据节点服务器完全不同;或者,对应于不同分组的、存储数据的副本的L个数据节点服务器部分不同。优选地,
Figure PCTCN2015095580-appb-000004
或者,D=[(N-1)/K]。
可选地,存储器330具体适于:若M是N的倍数,将M条数据等分为 N组数据;若M不是N的倍数,将M条数据分为N组数据,每两组数据的数据个数的差值小于或等于预设值。
本实施例提供的分布式数据集群系统的数据存储策略的核心思想是尽量破坏现有技术中数据的正本及其副本存储的相关性,对于其中两条数据来说,其正本及其副本所存储的数据节点服务器不完全相同。如果进一步提升本系统的技术效果,可使尽可能多的数据正本及其副本所存储的数据节点服务器不完全相同,即尽量使数据的存储在多个数据节点服务器中做均衡。当N个数据节点服务器中任一个数据节点服务器出现问题时,尽量由集群的其它数据节点服务器均衡地承担服务压力,以避免对某几个特定的数据节点服务器产生较大的影响。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可 以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的分布式数据集群系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图4示出了可以实现根据本发明的分布式数据存储方法的计算设备。该计算设备传统上包括处理器410和以存储设备420形式的计算机程序产品或者计算机可读介质。存储设备420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储设备420具有存储用于执行上述方法中的任何方法步骤的程序代码431的存储空间430。例如,存储程序代码的存储空间430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码431。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘、紧致盘(CD)、存储卡或者软 盘之类的程序代码载体。这样的计算机程序产品通常为例如图5所示的便携式或者固定存储单元。该存储单元可以具有与图4的计算设备中的存储设备420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的计算机可读代码431',即可以由诸如410之类的处理器读取的代码,当这些代码由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。

Claims (25)

  1. 一种分布式数据存储方法,包括:
    接收待存储的至少两条数据;
    将所述至少两条数据中的第一条数据的正本以及K份副本分别存储到N个数据节点服务器中的第一组K+1个数据节点服务器中,其中所述第一组K+1个数据节点服务器中每一数据节点服务器存储所述第一条数据的正本以及K份副本其中之一;以及
    将所述至少两条数据中的第二条数据的正本以及K份副本分别存储到所述N个数据节点服务器中的第二组K+1个数据节点服务器中,其中所述第二组K+1个数据节点服务器中每一数据节点服务器存储所述第二条数据的正本以及K份副本其中之一;
    其中,所述第一组K+1个数据节点服务器与所述第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,N为大于K+1的整数。
  2. 根据权利要求1所述的方法,其中,所述第一条数据的正本和所述第二条数据的正本被存储到相同的数据节点服务器中,以及存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器完全不同。
  3. 根据权利要求1所述的方法,其中,所述第一条数据的正本和所述第二条数据的正本被存储到相同的数据节点服务器中,以及存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器部分不同。
  4. 根据权利要求1所述的方法,其中,所述第一条数据的正本和所述第二条数据的正本被存储到不同的数据节点服务器中,以及存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器完全不同。
  5. 根据权利要求1所述的方法,其中,所述第一条数据的正本和所述第二条数据的正本被存储到不同的数据节点服务器中,以及存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本 的K个数据节点服务器部分不同。
  6. 根据权利要求1-5任一项所述的方法,还包括:
    根据所述至少两条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储所述至少两条数据的数据节点服务器。
  7. 一种分布式数据存储方法,包括:
    接收待存储的M条数据,M为大于1的整数;
    将M条数据分为N组数据,将所述N组数据的正本分别存储到N个数据节点服务器中,N为大于1的整数,且每一组数据的正本仅存储在一个数据节点服务器中;
    对于存储第i组数据的正本的第i个数据节点服务器,i∈[1,N],将所述第i组数据分为D个分组的数据,D为大于或等于1的整数,将每个分组中所有数据的K份副本分别存储到所述N个数据节点服务器中除了第i个数据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中,K为大于或等于1的整数,L不小于K,且N不小于K+1。
  8. 根据权利要求7所述的方法,其中,对应于所述不同分组的、存储数据的副本的L个数据节点服务器完全不同。
  9. 根据权利要求7所述的方法,其中,对应于所述不同分组的、存储数据的副本的L个数据节点服务器部分不同。
  10. 根据权利要求7所述的方法,其中,
    Figure PCTCN2015095580-appb-100001
    或者,D=[(N-1)/K]。
  11. 根据权利要求7所述的方法,其中,若M是N的倍数,则所述将M条数据分为N组数据具体为:将M条数据等分为N组数据;
    若M不是N的倍数,则所述将M条数据分为N组数据具体为:将M条数据分为N组数据,且每两组数据的数据个数的差值小于或等于预设值。
  12. 根据权利要求7-11任一项所述的方法,还包括:
    根据所述M条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储所述M条数据的数据节点服务器。
  13. 一种分布式数据集群系统,包括:多个数据节点服务器;以及
    数据接收器,适于接收待存储的至少两条数据;
    存储器,适于将所述至少两条数据中的第一条数据的正本以及K份副本分别存储到N个数据节点服务器中的第一组K+1个数据节点服务器中,其中所述第一组K+1个数据节点服务器中每一数据节点服务器存储所述第一条数据的正本以及K份副本其中之一;以及将所述至少两条数据中的第二条数据的正本以及K份副本分别存储到所述N个数据节点服务器中的第二组K+1个数据节点服务器中,其中所述第二组K+1个数据节点服务器中每一数据节点服务器存储所述第二条数据的正本以及K份副本其中之一;其中,所述第一组K+1个数据节点服务器与所述第二组K+1个数据节点服务器不完全相同,K为大于或等于1的整数,N为大于K+1的整数。
  14. 根据权利要求13所述的系统,其中,所述存储器具体适于:将所述第一条数据的正本和所述第二条数据的正本存储到相同的数据节点服务器中,存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器完全不同。
  15. 根据权利要求13所述的系统,其中,所述存储器具体适于:将所述第一条数据的正本和所述第二条数据的正本存储到相同的数据节点服务器中,存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器部分不同。
  16. 根据权利要求13所述的系统,其中,所述存储器具体适于:将所述第一条数据的正本和所述第二条数据的正本存储到不同的数据节点服务器中,存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器完全不同。
  17. 根据权利要求13所述的系统,其中,所述存储器具体适于:将所述第一条数据的正本和所述第二条数据的正本存储到不同的数据节点服务器中,存储所述第二条数据的K份副本的K个数据节点服务器与存储所述第一条数据的K份副本的K个数据节点服务器部分不同。
  18. 根据权利要求13所述的系统,其中,所述至少两条数据为M条数 据,所述存储器还适于:
    将M条数据分为N组数据,将所述N组数据的正本分别存储到N个数据节点服务器中,N为大于1的整数,且每一组数据的正本仅存储在一个数据节点服务器中;
    对于存储第i组数据的正本的第i个数据节点服务器,i∈[1,N],将所述第i组数据分为D个分组的数据,D为大于或等于1的整数,将每个分组中所有数据的K份副本分别存储到所述N个数据节点服务器中除了第i个数据节点服务器以外的任意L个数据节点服务器中,且分组中每一条数据的任意两份副本不在同一数据节点服务器中,K为大于或等于1的整数,L不小于K,且N不小于K+1。
  19. 根据权利要求18所述的系统,其中,对应于所述不同分组的、存储数据的副本的L个数据节点服务器完全不同。
  20. 根据权利要求18所述的系统,其中,对应于所述不同分组的、存储数据的副本的L个数据节点服务器部分不同。
  21. 根据权利要求18所述的系统,其中,
    Figure PCTCN2015095580-appb-100002
    或者,D=[(N-1)/K]。
  22. 根据权利要求18所述的系统,其特征在于,所述存储器具体适于:若M是N的倍数,将M条数据等分为N组数据;若M不是N的倍数,将M条数据分为N组数据,且每两组数据的数据个数的差值小于或等于预设值。
  23. 根据权利要求13-22任一项所述的系统,还包括:
    选择器,适于根据所述至少两条数据的数据量大小,从多个数据节点服务器中选取N个数据节点服务器作为存储所述至少两条数据的数据节点服务器。
  24. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-12中的任一项所述的分布式数据存储方法。
  25. 一种计算机可读介质,其中存储了如权利要求24所述的计算机程序。
PCT/CN2015/095580 2014-12-10 2015-11-25 分布式数据存储方法及分布式数据集群系统 WO2016091072A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2014107567342 2014-12-10
CN201410756734.2A CN104468793B (zh) 2014-12-10 2014-12-10 分布式数据存储方法及分布式数据集群系统

Publications (1)

Publication Number Publication Date
WO2016091072A1 true WO2016091072A1 (zh) 2016-06-16

Family

ID=52914145

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095580 WO2016091072A1 (zh) 2014-12-10 2015-11-25 分布式数据存储方法及分布式数据集群系统

Country Status (2)

Country Link
CN (1) CN104468793B (zh)
WO (1) WO2016091072A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468793B (zh) * 2014-12-10 2017-11-03 北京奇虎科技有限公司 分布式数据存储方法及分布式数据集群系统
CN106294511B (zh) * 2015-06-10 2019-07-02 中国移动通信集团广东有限公司 一种Hadoop分布式文件系统的存储方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158540A (zh) * 2011-02-18 2011-08-17 广州从兴电子开发有限公司 分布式数据库实现系统及方法
CN103152395A (zh) * 2013-02-05 2013-06-12 北京奇虎科技有限公司 一种分布式文件系统的存储方法及装置
CN104468793A (zh) * 2014-12-10 2015-03-25 北京奇虎科技有限公司 分布式数据存储方法及分布式数据集群系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753349B (zh) * 2008-12-09 2012-08-15 中国移动通信集团公司 数据节点的升级方法、升级调度节点及升级系统
CN101539950A (zh) * 2009-05-08 2009-09-23 成都市华为赛门铁克科技有限公司 数据存取方法和装置
CN101610287B (zh) * 2009-06-16 2012-03-14 浙江大学 一种应用于分布式海量存储系统的负载均衡方法
CN102521084B (zh) * 2011-12-20 2013-11-20 惠州市亿能电子有限公司 一种电动汽车电池管理系统的数据存储以及读取方法
CN103559102A (zh) * 2013-10-22 2014-02-05 北京航空航天大学 数据冗余处理方法、装置和分布式存储系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158540A (zh) * 2011-02-18 2011-08-17 广州从兴电子开发有限公司 分布式数据库实现系统及方法
CN103152395A (zh) * 2013-02-05 2013-06-12 北京奇虎科技有限公司 一种分布式文件系统的存储方法及装置
CN104468793A (zh) * 2014-12-10 2015-03-25 北京奇虎科技有限公司 分布式数据存储方法及分布式数据集群系统

Also Published As

Publication number Publication date
CN104468793B (zh) 2017-11-03
CN104468793A (zh) 2015-03-25

Similar Documents

Publication Publication Date Title
US10560270B2 (en) Optimal data storage configuration in a blockchain
US9959169B2 (en) Expansion of dispersed storage network (DSN) memory
US10229004B2 (en) Data transfer priority levels
US10685037B2 (en) Volume cohorts in object-redundant storage systems
US20170212781A1 (en) Parallel execution of blockchain transactions
US10437673B2 (en) Internet based shared memory in a distributed computing system
JP2010176180A (ja) ストレージシステム
WO2016180049A1 (zh) 一种存储管理方法及分布式文件系统
Ibrahim et al. Intelligent data placement mechanism for replicas distribution in cloud storage systems
WO2014089786A1 (zh) 数据存储方法及系统
CN109478125B (zh) 操纵分布式一致性协议以识别期望的存储单元集
CN107205024A (zh) 一种云存储系统中数据去重方法及系统
JP5391705B2 (ja) ストレージシステム
CN109189327A (zh) 区块链数据的压缩处理方法和装置
US10469406B2 (en) Partial task execution in a dispersed storage network
WO2016091072A1 (zh) 分布式数据存储方法及分布式数据集群系统
US20140156607A1 (en) Index for deduplication
US9684668B1 (en) Systems and methods for performing lookups on distributed deduplicated data systems
US10275185B2 (en) Fail-in-place supported via decentralized or Distributed Agreement Protocol (DAP)
US20190034276A1 (en) Resolving write conflicts in a dispersed storage network
US10387252B2 (en) Synchronously storing data in a plurality of dispersed storage networks
US20180113747A1 (en) Overdrive mode for distributed storage networks
WO2018156503A1 (en) Methods for performing data deduplication on data blocks at granularity level and devices thereof
US10540329B2 (en) Dynamic data protection and distribution responsive to external information sources
US9916372B1 (en) Folded-hashtable synchronization mechanism

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: 15867464

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: 15867464

Country of ref document: EP

Kind code of ref document: A1