WO2019085334A1 - 分布式存储方法、控制服务器及计算机可读存储介质 - Google Patents

分布式存储方法、控制服务器及计算机可读存储介质 Download PDF

Info

Publication number
WO2019085334A1
WO2019085334A1 PCT/CN2018/076172 CN2018076172W WO2019085334A1 WO 2019085334 A1 WO2019085334 A1 WO 2019085334A1 CN 2018076172 W CN2018076172 W CN 2018076172W WO 2019085334 A1 WO2019085334 A1 WO 2019085334A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
node
storage node
data
allocation table
Prior art date
Application number
PCT/CN2018/076172
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 WO2019085334A1 publication Critical patent/WO2019085334A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Definitions

  • the present application relates to the field of computer information technology, and in particular, to a distributed storage method, a control server, and a computer readable storage medium.
  • the present application provides a distributed storage method, a control server, and a computer readable storage medium, and improves storage efficiency of distributed storage by setting a shared storage allocation table and a distributed storage architecture.
  • control server including a memory and a processor, the memory storing a distributed storage system operable on the processor, the distributed storage
  • the system implements the following steps when executed by the processor:
  • the specific storage node When receiving the data storage request, the specific storage node is selected to save the data corresponding to the data storage request according to the real-time working state information of each storage node recorded in the shared storage allocation table.
  • each storage node comprises a primary server and a secondary server
  • the shared storage allocation table includes data stored by a storage node, an array of storage nodes, and a location at which data is allocated to a storage node, wherein the storage node array is used to record state information of the storage node;
  • the status information of the storage node includes the storage data amount of the storage node, the node status, whether the node is alive, the previous node and the next node, the total capacity, and the load factor.
  • the selecting the specific storage node to save the data corresponding to the data storage request comprises:
  • a specific storage node whose remaining storage capacity satisfies the data storage request and has the smallest load factor is selected from all the storage nodes, wherein the remaining storage capacity of each storage node is equal to each The total capacity of the storage node minus the amount of stored data;
  • the distributed storage system is further used to implement the following steps when executed by the processor:
  • the specific storage node After the data corresponding to the data storage request is saved to the primary server of the specific storage node, the specific storage node is controlled to start the data synchronization process, and the data corresponding to the data storage request is copied to the slave storage unit of the specific storage node. And recording, in the shared storage allocation table, the secondary storage unit address of the replicated data at the particular storage node.
  • the distributed storage system is further used to implement the following steps when executed by the processor:
  • the storage node is deleted from the shared storage allocation table, and the previous node of the storage node is connected to the next node.
  • the present application further provides a distributed storage method, which is applied to a control server, and the method includes:
  • the specific storage node When receiving the data storage request, the specific storage node is selected to save the data corresponding to the data storage request according to the real-time working state information of each storage node recorded in the shared storage allocation table.
  • each storage node comprises a primary server and a secondary server
  • the shared storage allocation table includes data stored by a storage node, an array of storage nodes, and a location at which data is allocated to a storage node, wherein the storage node array is used to record state information of the storage node;
  • the status information of the storage node includes the storage data amount of the storage node, the node status, whether the node is alive, the previous node and the next node, the total capacity, and the load factor.
  • the selecting the specific storage node to save the data corresponding to the data storage request comprises:
  • a specific storage node whose remaining storage capacity satisfies the data storage request and has the smallest load factor is selected from all the storage nodes, wherein the remaining storage capacity of each storage node is equal to each The total capacity of the storage node minus the amount of stored data;
  • the method further comprises:
  • the specific storage node After the data corresponding to the data storage request is saved to the primary server of the specific storage node, the specific storage node is controlled to start the data synchronization process, and the data corresponding to the data storage request is copied to the slave storage unit of the specific storage node. And recording, in the shared storage allocation table, a secondary storage unit address of the replicated data at the specific storage node;
  • the storage node is deleted from the shared storage allocation table, and the previous node of the storage node is connected to the next node.
  • the present application further provides a computer readable storage medium storing a distributed storage system, the distributed storage system being executable by at least one processor, such that The at least one processor performs the steps of the distributed storage method as described above.
  • control server the distributed storage method and the computer readable storage medium proposed by the present application are provided by setting a shared storage allocation table and a distributed storage architecture (separate storage servers of the control server and the storage node).
  • a distributed storage scheme based on shared storage allocation table improves the storage efficiency, reliability, and fault tolerance of distributed storage, and is superior to the traditional centralized data storage scheme.
  • FIG. 1 is a schematic diagram of a system architecture between a control server and a storage node according to the present application
  • FIG. 2 is a schematic diagram of an optional hardware architecture of the control server of the present application.
  • FIG. 3 is a schematic diagram of a program module of an embodiment of a distributed storage system in a control server of the present application
  • FIG. 4 is a schematic diagram of an implementation process of an embodiment of a distributed storage method according to the present application.
  • Control server 2 Shared storage allocation table twenty four Storage node 4, 5, 6
  • FIG. 1 it is a schematic diagram of a system architecture between a control server and a storage node in the present application.
  • the control server 2 establishes a communication connection with one or more storage nodes (such as storage nodes 4-6), and a shared storage allocation table 24 is created in the control server 2.
  • the storage node 4 includes a primary server 41 and a secondary server 42.
  • the storage node 5 includes a primary server 51 and a secondary server 52.
  • the storage node 6 includes a primary server 61 and a secondary server 62.
  • the present application proposes a control server 2.
  • control server 2 may include, but is not limited to, a memory 21, a processor 22, and a network interface 23 that can communicate with each other through a system bus. It is to be noted that Figure 2 shows only the control server 2 with components 21-23, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead.
  • the control server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the control server 2 may be an independent server or a server cluster composed of multiple servers. .
  • the memory 21 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 21 may be an internal storage unit of the control server 2, such as a hard disk or memory of the control server 2.
  • the memory 21 may also be an external storage device of the control server 2, such as a plug-in hard disk equipped on the control server 2, a smart memory card (SMC), and a secure digital device. (Secure Digital, SD) card, flash card, etc.
  • the memory 21 may also include both the internal storage unit of the control server 2 and its external storage device.
  • the memory 21 is generally used to store an operating system installed in the control server 2 and various types of application software, such as program codes of the distributed storage system 20. Further, the memory 21 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 22 is typically used to control the overall operation of the control server 2, such as performing control and processing related to data interaction or communication with the control server 2.
  • the processor 22 is configured to run program code or process data stored in the memory 21, such as running the distributed storage system 20 and the like.
  • the network interface 23 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the control server 2 and other electronic devices.
  • the network interface 23 is configured to connect the control server 2 to an external data platform (such as the primary server 41 or the secondary server 42) through a network, and establish a data transmission channel between the control server 2 and an external data platform.
  • the network may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, or a 5G network.
  • Wireless or wired networks such as network, Bluetooth, Wi-Fi, etc.
  • FIG. 3 it is a program module diagram of an embodiment of the distributed storage system 20 in the control server 2 of the present application.
  • the distributed storage system 20 may be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and are composed of one or more processors ( This embodiment is executed by the processor 22) to complete the application.
  • the distributed storage system 20 can be partitioned into a creation module 201, a write module 202, and a storage module 203.
  • a program module as referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the distributed storage system 20 in the control server 2. The function of each program module 201-203 will be described in detail below.
  • the creating module 201 is configured to establish a communication connection between the control server 2 and one or more storage nodes (such as the storage nodes 4-6), and create a shared storage allocation table 24 in the control server 2.
  • each storage node is set as a storage server group, and each storage server group includes a primary server and a secondary server for data synchronization and backup.
  • the storage node 4 includes a primary server 41 and a secondary server 42
  • the storage node 5 includes a primary server 51 and a secondary server 52
  • the storage node 6 includes a primary server 61 and a secondary server 62.
  • the shared storage allocation table 24 is stored in the memory 21 of the control server 2, and each storage node shares a storage allocation table in the entire system, and the shared storage allocation table 24 is maintained by the control server 2. status.
  • the shared storage allocation table 24 includes, but is not limited to, data stored by the storage node, an array of storage nodes, and a location at which the data is allocated at the storage node (eg, a storage unit address of the primary server or a storage unit address of the secondary server) ).
  • the storage node array is used to record data such as status information of the storage node.
  • the node status includes a status of the primary server and a status of the secondary server.
  • the data structure of the shared storage allocation table 24 can be defined as the following format:
  • the writing module 202 is configured to acquire real-time working state information of each storage node every preset time (for example, 3 seconds), and write real-time working state information of each storage node to the shared storage allocation.
  • Table 24, that is, the node information stored in the shared storage allocation table 24 is updated in real time.
  • the real-time working status information of each storage node includes, but is not limited to, a storage data size, a node status, a node alive, a previous node and a next node, a total capacity, and a load factor.
  • the control server 2 and the storage node use a heartbeat mechanism for communication.
  • the heartbeat mechanism adopted in this embodiment is to add a function keepAlive() in the storage node, and the function sends a request message (such as http request) to the control server 2 every preset time (for example, 3 seconds).
  • the request message includes real-time working status information of the storage node (such as status, isAlive, size, etc.).
  • the control server 2 updates the node information stored in the shared storage allocation table 24 in real time, and returns a response message (such as an ACK response) to the storage node.
  • the storage module 203 is configured to: when receiving a data storage request (such as a web object storage request), select a specific storage node to save the real-time working state information of each storage node recorded in the shared storage allocation table 24 The data corresponding to the data storage request.
  • a data storage request such as a web object storage request
  • the selecting, by the specific storage node, the data corresponding to the data storage request includes:
  • the storage unit address of the data corresponding to the data storage request at the primary server of the specific storage node is recorded.
  • the remaining storage capacity of each storage node is equal to the total capacity of each storage node minus the amount of storage data. Since the load balancing operation is performed according to the storage data size of each storage node in this embodiment, it is ensured that the data can be uniformly distributed and stored on the respective storage nodes.
  • the specific storage node is controlled to start the data synchronization process, and the data corresponding to the data storage request is copied to the slave storage of the specific storage node.
  • the slave storage unit address of the duplicate data at the specific storage node is recorded, and data synchronization and backup are implemented. That is to say, the same data has two copies on the specific storage node, and when the primary server stops working, the corresponding data can also be found in the secondary server.
  • the distributed storage system 20 is further configured to:
  • the primary server of a storage node stops working, the primary server status information (such as update to shutdown) of the storage node is updated in the shared storage allocation table 24, and the backup server (such as the secondary server) of the storage node is used as A primary server is added to the shared storage allocation table 24 to ensure system availability;
  • the storage node is deleted from the shared storage allocation table 24, and the previous node of the storage node is connected to the next node.
  • the distributed storage system 20 proposed by the present application provides a shared storage based allocation by setting a shared storage allocation table and a distributed storage architecture (separating storage servers of the control server and the storage node).
  • the distributed storage scheme of the table improves the storage efficiency, reliability, and fault tolerance of the distributed storage, and is superior to the traditional centralized data storage scheme.
  • the present application also proposes a distributed storage method.
  • FIG. 4 it is a schematic flowchart of an implementation process of an embodiment of the distributed storage method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 4 may be changed according to different requirements, and some steps may be omitted.
  • step S41 a communication connection between the control server 2 and one or more storage nodes (such as storage nodes 4-6) is established, and a shared storage allocation table 24 is created in the control server 2.
  • each storage node is set as a storage server group, and each storage server group includes a primary server and a secondary server for data synchronization and backup.
  • the storage node 4 includes a primary server 41 and a secondary server 42
  • the storage node 5 includes a primary server 51 and a secondary server 52
  • the storage node 6 includes a primary server 61 and a secondary server 62.
  • the shared storage allocation table 24 is stored in the memory 21 of the control server 2, and each storage node shares a storage allocation table in the entire system, and the shared storage allocation table 24 is maintained by the control server 2. status.
  • the shared storage allocation table 24 includes, but is not limited to, data stored by the storage node, an array of storage nodes, and a location at which the data is allocated at the storage node (eg, a storage unit address of the primary server or a storage unit address of the secondary server) ).
  • the storage node array is used to record data such as status information of the storage node.
  • the node status includes a status of the primary server and a status of the secondary server.
  • the data structure of the shared storage allocation table 24 can be defined as the following format:
  • Step S42 Obtain real-time working state information of each storage node every preset time (for example, 3 seconds), and write real-time working state information of each storage node to the shared storage allocation table 24, that is, real-time update.
  • the shared storage stores the node information stored in the table 24.
  • the real-time working status information of each storage node includes, but is not limited to, a storage data size, a node status, a node alive, a previous node and a next node, a total capacity, and a load factor.
  • the control server 2 and the storage node use a heartbeat mechanism for communication.
  • the heartbeat mechanism adopted in this embodiment is to add a function keepAlive() in the storage node, and the function sends a request message (such as http request) to the control server 2 every preset time (for example, 3 seconds).
  • the request message includes real-time working status information of the storage node (such as status, isAlive, size, etc.).
  • the control server 2 updates the node information stored in the shared storage allocation table 24 in real time, and returns a response message (such as an ACK response) to the storage node.
  • Step S43 when receiving the data storage request (such as a web object storage request), selecting a specific storage node to save the data storage request according to the real-time working state information of each storage node recorded in the shared storage allocation table 24. data.
  • the data storage request such as a web object storage request
  • the selecting, by the specific storage node, the data corresponding to the data storage request includes:
  • the storage unit address of the data corresponding to the data storage request at the primary server of the specific storage node is recorded.
  • the remaining storage capacity of each storage node is equal to the total capacity of each storage node minus the amount of storage data. Since the load balancing operation is performed according to the storage data size of each storage node in this embodiment, it is ensured that the data can be uniformly distributed and stored on the respective storage nodes.
  • the specific storage node is controlled to start the data synchronization process, and the data corresponding to the data storage request is copied to the slave storage of the specific storage node.
  • the slave storage unit address of the duplicate data at the specific storage node is recorded, and data synchronization and backup are implemented. That is to say, the same data has two copies on the specific storage node, and when the primary server stops working, the corresponding data can also be found in the secondary server.
  • the distributed storage method further includes the following steps:
  • the primary server of a storage node stops working, the primary server status information (such as update to shutdown) of the storage node is updated in the shared storage allocation table 24, and the backup server (such as the secondary server) of the storage node is used as A primary server is added to the shared storage allocation table 24 to ensure system availability;
  • the storage node is deleted from the shared storage allocation table 24, and the previous node of the storage node is connected to the next node.
  • the distributed storage method proposed by the present application provides a sharing-based method by setting a shared storage allocation table and a distributed storage architecture (separating storage servers of the control server and the storage node).
  • the distributed storage scheme of the storage allocation table improves the storage efficiency, reliability, and fault tolerance of the distributed storage, and is superior to the traditional centralized data storage scheme.
  • the present application further provides a computer readable storage medium (such as a ROM/RAM, a magnetic disk, an optical disk), the computer readable storage medium storing a distributed storage system 20, the distributed The storage system 20 can be executed by at least one processor 22 to cause the at least one processor 22 to perform the steps of the distributed storage method as described above.
  • a computer readable storage medium such as a ROM/RAM, a magnetic disk, an optical disk
  • the computer readable storage medium storing a distributed storage system 20
  • the storage system 20 can be executed by at least one processor 22 to cause the at least one processor 22 to perform the steps of the distributed storage method as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

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

Abstract

本申请公开了一种分布式存储方法,该方法包括步骤:建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。本申请可以提高分布式存储的效率和可靠性。

Description

分布式存储方法、控制服务器及计算机可读存储介质
本申请要求于2017年11月01日提交中国专利局、申请号为201711060240.0、发明名称为“分布式存储方法、控制服务器及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及计算机信息技术领域,尤其涉及一种分布式存储方法、控制服务器及计算机可读存储介质。
背景技术
目前,针对Web对象的存储大多使用的是传统的集中式存储服务器,在集中式存储服务器的存储模式下,存储服务器容易成为***的瓶颈,一旦服务器发生故障,可能导致整个***的瘫痪,并且无法实现大规模存储。分布式存储是目前解决大规模数据存储的有效途径,但是,现有的分布式存储方案不能很好地满足Web对象的自身特点和特定应用场景。因此,急需针对Web对象设计符合特定要求的分布式存储方案。故,现有技术中的分布式存储方法设计不够合理,亟需改进。
发明内容
有鉴于此,本申请提出一种分布式存储方法、控制服务器及计算机可读存储介质,通过设置共享存储分配表和分布式存储架构,提高了分布式存储的存储效率。
首先,为实现上述目的,本申请提出一种控制服务器,所述控制服务器包括存储器及处理器,所述存储器上存储有可在所述处理器上运行的分布式存储***,所述分布式存储***被所述处理器执行时实现如下步骤:
建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;
每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;及
当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
优选地,每个存储节点包括一个主服务器和一个从服务器;
所述共享存储分配表包括存储节点存储的数据、存储节点数组、及数据被分配在存储节点的位置,其中,所述存储节点数组用于记录存储节点的状态信息;及
所述存储节点的状态信息包括存储节点的存储数据量、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子。
优选地,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,其中,每个存储节点的剩余存储容量等于每个存储节点的总容量减去存储数据量;及
将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。
优选地,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表中记录该复制数据在该特定存储节点的从服务器存储单元地址。
优选地,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
此外,为实现上述目的,本申请还提供一种分布式存储方法,该方法应用于控制服务器,所述方法包括:
建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;
每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;及
当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
优选地,每个存储节点包括一个主服务器和一个从服务器;
所述共享存储分配表包括存储节点存储的数据、存储节点数组、及数据被分配在存储节点的位置,其中,所述存储节点数组用于记录存储节点的状态信息;及
所述存储节点的状态信息包括存储节点的存储数据量、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子。
优选地,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,其 中,每个存储节点的剩余存储容量等于每个存储节点的总容量减去存储数据量;及
将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。
优选地,该方法还包括:
当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表中记录该复制数据在该特定存储节点的从服务器存储单元地址;
当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有分布式存储***,所述分布式存储***可被至少一个处理器执行,以使所述至少一个处理器执行如上述的分布式存储方法的步骤。
相较于现有技术,本申请所提出的控制服务器、分布式存储方法及计算机可读存储介质,通过设置共享存储分配表和分布式存储架构(控制服务器和存储节点的存储服务器分开),提供了一种基于共享存储分配表的分布式存储方案,提高了分布式存储的存储效率、可靠性、和容错性,更优于传统的集中式数据存储方案。
附图说明
图1是本申请控制服务器与存储节点之间的***架构示意图;
图2是本申请控制服务器一可选的硬件架构的示意图;
图3是本申请控制服务器中分布式存储***一实施例的程序模块示意图;
图4为本申请分布式存储方法一实施例的实施流程示意图。
附图标记:
控制服务器 2
共享存储分配表 24
存储节点 4、5、6
主服务器 41、51、61
从服务器 42、52、62
存储器 21
处理器 22
网络接口 23
分布式存储*** 20
创建模块 201
写入模块 202
存储模块 203
流程步骤 S41-S43
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
进一步需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
参阅图1所示,是本申请控制服务器与存储节点之间的***架构示意图。本实施例中,控制服务器2与一个或多个存储节点(如存储节点4-6)建立通讯连接,该控制服务器2中创建有一个共享存储分配表24。进一步地,存储节点4包括主服务器41和从服务器42,存储节点5包括主服务器51和从服务器52,存储节点6包括主服务器61和从服务器62。以下通过图2至图4的描述进一步说明本申请的技术方案。
首先,本申请提出一种控制服务器2。
参阅图2所示,是本申请控制服务器2一可选的硬件架构的示意图。本实施例中,所述控制服务器2可包括,但不限于,可通过***总线相互通信连接存储器21、处理器22、网络接口23。需要指出的是,图2仅示出了具有组件21-23的控制服务器2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,所述控制服务器2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该控制服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。
所述存储器21至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器21可以是所述控制服务器2的内部存储单元,例如该控制服务器2的硬盘或内存。在另一些实施例中,所述存储器21也可以是所述控制服务器2的外部存储设备,例如该控制服务器2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器21还可以既包括所述控制服务器2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器21通常用于存储安装于所述控制服务器2的操作***和各类应用软件,例如所述分布式存储***20的程序代码等。此外,所述存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述控制服务器2的总体操作,例如执行与所述控制服务器2进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器22用于运行所述存储器21中存储的程序代码或者处理数据,例如运行所述的分布式存储***20等。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述控制服务器2与其他电子设备之间建立通信连接。例如,所述网络接口23用于通过网络将所述控制服务器2与外部数据平台(如主服务器41或从服务器42)相连,在所述控制服务器2与外部数据平台之间的建立 数据传输通道和通信连接。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯***(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。
参阅图3所示,是本申请控制服务器2中分布式存储***20一实施例的程序模块图。本实施例中,所述的分布式存储***20可以被分割成一个或多个程序模块,所述一个或者多个程序模块被存储于所述存储器21中,并由一个或多个处理器(本实施例中为所述处理器22)所执行,以完成本申请。例如,在图3中,所述的分布式存储***20可以被分割成创建模块201、写入模块202、以及存储模块203。本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述所述分布式存储***20在所述控制服务器2中的执行过程。以下将就各程序模块201-203的功能进行详细描述。
所述创建模块201,用于建立控制服务器2与一个或多个存储节点(如存储节点4-6)的通讯连接,于该控制服务器2中创建一个共享存储分配表24。在本实施例中,每个存储节点设置为一个存储服务器组,每个存储服务器组包括一个主服务器和一个从服务器,用于数据同步和备份。例如,存储节点4包括主服务器41和从服务器42,存储节点5包括主服务器51和从服务器52,存储节点6包括主服务器61和从服务器62。
优选地,在本实施例中,所述共享存储分配表24存储于控制服务器2的存储器21,整个***中各个存储节点共享一个存储分配表,并且由控制服务器2维护该共享存储分配表24的状态。进一步地,所述共享存储分配表24包括,但不限于,存储节点存储的数据、存储节点数组、及数据被分配在存储节点的位置(如主服务器的存储单元地址或从服务器的存储单元地址)。其中,所述存储节点数组用于记录存储节点的状态信息等数据。
进一步地,在本实施例中,所述存储节点的状态信息包括,但不限于如下信息:存储节点的存储数据量(size)、节点状态(开启和关闭)、节点是否活着(isAvlie)、上一个节点和下一个节点、总容量(total)、及负载因子(存储数据量/总容量=size/total)等。其中,在本实施例中,所述节点状态包括主服务器的状态和从服务器的状态。
举例而言,所述共享存储分配表24的数据结构可以定义为如下格式:
Figure PCTCN2018076172-appb-000001
Figure PCTCN2018076172-appb-000002
所述写入模块202,用于每隔预设时间(如3秒钟),获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表24,即实时更新所述共享存储分配表24中存储的节点信息。其中,每个存储节点的实时工作状态信息包括,但不限于,存储数据量(size)、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子等。
优选地,在本实施例中,控制服务器2和存储节点之间采用心跳机制进行通讯。具体而言,本实施例中采用的心跳机制是在存储节点中添加一个函数keepAlive(),该函数每隔预设时间(如3秒钟)发送一次请求消息(如http请求)到控制服务器2,该请求消息包括存储节点的实时工作状态信息(如status,isAlive,size等信息)。控制服务器2收到存储节点的实时工作状态信息后,将实时更新所述共享存储分配表24中存储的节点信息,并返回一个应答消息(如ACK应答)至存储节点。
所述存储模块203,用于当接收到数据存储请求时(如Web对象存储请求),根据所述共享存储分配表24中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
优选地,在本实施例中,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表24中记录该数据存储请求对应的数据在该特定存储 节点的主服务器的存储单元地址。其中,每个存储节点的剩余存储容量等于每个存储节点的总容量(total)减去存储数据量(size)。由于在本实施例中根据每个存储节点的存储数据量(size)进行负载均衡操作,从而保证了数据能被均匀地分布存储在各个存储节点上。
进一步地,当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表24中记录该复制数据在该特定存储节点的从服务器存储单元地址,实现数据同步和备份。也就是说,同一份数据,在该特定存储节点上有两个拷贝,当主服务器停止工作时,还可以在从服务器中找到相应数据。
进一步地,在其它实施例中,所述分布式存储***20还用于:
当一个存储节点的主服务器停止工作时,在所述共享存储分配表24中更新该存储节点的主服务器状态信息(如更新为关闭),并将该存储节点的备份服务器(如从服务器)作为主服务器添加到所述共享存储分配表24,以保证***的可用性;
当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表24中删除,并将该存储节点的上一个节点连接至下一个节点。
通过上述程序模块201-203,本申请所提出的分布式存储***20,通过设置共享存储分配表和分布式存储架构(控制服务器和存储节点的存储服务器分开),提供了一种基于共享存储分配表的分布式存储方案,提高了分布式存储的存储效率、可靠性、和容错性,更优于传统的集中式数据存储方案。
此外,本申请还提出一种分布式存储方法。
参阅图4所示,是本申请分布式存储方法一实施例的实施流程示意图。在本实施例中,根据不同的需求,图4所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。
步骤S41,建立控制服务器2与一个或多个存储节点(如存储节点4-6)的通讯连接,于该控制服务器2中创建一个共享存储分配表24。在本实施例中,每个存储节点设置为一个存储服务器组,每个存储服务器组包括一个主服务器和一个从服务器,用于数据同步和备份。例如,存储节点4包括主服务器41和从服务器42,存储节点5包括主服务器51和从服务器52,存储节点6包括主服务器61和从服务器62。
优选地,在本实施例中,所述共享存储分配表24存储于控制服务器2的存储器21,整个***中各个存储节点共享一个存储分配表,并且由控制服务器2维护该共享存储分配表24的状态。进一步地,所述共享存储分配表24包括,但不限于,存储节点存储的数据、存储节点数组、及数据被分配在存储节点 的位置(如主服务器的存储单元地址或从服务器的存储单元地址)。其中,所述存储节点数组用于记录存储节点的状态信息等数据。
进一步地,在本实施例中,所述存储节点的状态信息包括,但不限于如下信息:存储节点的存储数据量(size)、节点状态(开启和关闭)、节点是否活着(isAvlie)、上一个节点和下一个节点、总容量(total)、及负载因子(存储数据量/总容量=size/total)等。其中,在本实施例中,所述节点状态包括主服务器的状态和从服务器的状态。
举例而言,所述共享存储分配表24的数据结构可以定义为如下格式:
Figure PCTCN2018076172-appb-000003
步骤S42,每隔预设时间(如3秒钟),获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表24,即实时更新所述共享存储分配表24中存储的节点信息。其中,每个存储节点的实时工作状态信息包括,但不限于,存储数据量(size)、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子等。
优选地,在本实施例中,控制服务器2和存储节点之间采用心跳机制进行通讯。具体而言,本实施例中采用的心跳机制是在存储节点中添加一个函数keepAlive(),该函数每隔预设时间(如3秒钟)发送一次请求消息(如http请求)到控制服务器2,该请求消息包括存储节点的实时工作状态信息(如status,isAlive,size等信息)。控制服务器2收到存储节点的实时工作状态信息后,将实时更新所述共享存储分配表24中存储的节点信息,并返回一个应答消息(如 ACK应答)至存储节点。
步骤S43,当接收到数据存储请求时(如Web对象存储请求),根据所述共享存储分配表24中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
优选地,在本实施例中,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表24中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。其中,每个存储节点的剩余存储容量等于每个存储节点的总容量(total)减去存储数据量(size)。由于在本实施例中根据每个存储节点的存储数据量(size)进行负载均衡操作,从而保证了数据能被均匀地分布存储在各个存储节点上。
进一步地,当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表24中记录该复制数据在该特定存储节点的从服务器存储单元地址,实现数据同步和备份。也就是说,同一份数据,在该特定存储节点上有两个拷贝,当主服务器停止工作时,还可以在从服务器中找到相应数据。
进一步地,在其它实施例中,所述分布式存储方法还包括如下步骤:
当一个存储节点的主服务器停止工作时,在所述共享存储分配表24中更新该存储节点的主服务器状态信息(如更新为关闭),并将该存储节点的备份服务器(如从服务器)作为主服务器添加到所述共享存储分配表24,以保证***的可用性;
当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表24中删除,并将该存储节点的上一个节点连接至下一个节点。
通过上述步骤S41-S43及其它相关步骤,本申请所提出的分布式存储方法,通过设置共享存储分配表和分布式存储架构(控制服务器和存储节点的存储服务器分开),提供了一种基于共享存储分配表的分布式存储方案,提高了分布式存储的存储效率、可靠性、和容错性,更优于传统的集中式数据存储方案。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质(如ROM/RAM、磁碟、光盘),所述计算机可读存储介质存储有分布式存储*** 20,所述分布式存储***20可被至少一个处理器22执行,以使所述至少一个处理器22执行如上所述的分布式存储方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上参照附图说明了本申请的优选实施例,并非因此局限本申请的权利范围。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本领域技术人员不脱离本申请的范围和实质,可以有多种变型方案实现本申请,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种控制服务器,其特征在于,所述控制服务器包括存储器及处理器,所述存储器上存储有可在所述处理器上运行的分布式存储***,所述分布式存储***被所述处理器执行时实现如下步骤:
    建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;
    每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;及
    当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
  2. 如权利要求1所述的控制服务器,其特征在于,每个存储节点包括一个主服务器和一个从服务器;
    所述共享存储分配表包括存储节点存储的数据、存储节点数组、及数据被分配在存储节点的位置,其中,所述存储节点数组用于记录存储节点的状态信息;及
    所述存储节点的状态信息包括存储节点的存储数据量、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子。
  3. 如权利要求2所述的控制服务器,其特征在于,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
    根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,其中,每个存储节点的剩余存储容量等于每个存储节点的总容量减去存储数据量;及
    将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。
  4. 如权利要求3所述的控制服务器,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表中记录该复制数据在该特定存储节点的从服务器存储单元地址。
  5. 如权利要求2所述的控制服务器,其特征在于,所述分布式存储*** 被所述处理器执行时还用于实现如下步骤:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  6. 如权利要求3所述的控制服务器,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  7. 如权利要求4所述的控制服务器,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  8. 一种分布式存储方法,应用于控制服务器,其特征在于,所述方法包括:
    建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;
    每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;及
    当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
  9. 如权利要求8所述的分布式存储方法,其特征在于,每个存储节点包括一个主服务器和一个从服务器;
    所述共享存储分配表包括存储节点存储的数据、存储节点数组、及数据 被分配在存储节点的位置,其中,所述存储节点数组用于记录存储节点的状态信息;及
    所述存储节点的状态信息包括存储节点的存储数据量、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子。
  10. 如权利要求9所述的分布式存储方法,其特征在于,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
    根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,其中,每个存储节点的剩余存储容量等于每个存储节点的总容量减去存储数据量;及
    将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。
  11. 如权利要求10所述的分布式存储方法,其特征在于,该方法还包括:
    当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到该特定存储节点的从服务器存储单元中,并在所述共享存储分配表中记录该复制数据在该特定存储节点的从服务器存储单元地址。
  12. 如权利要求9所述的分布式存储方法,其特征在于,该方法还包括:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  13. 如权利要求10所述的分布式存储方法,其特征在于,该方法还包括:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  14. 如权利要求11所述的分布式存储方法,其特征在于,该方法还包括:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新 该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有分布式存储***,所述分布式存储***可被至少一个处理器执行,所述分布式存储***被所述处理器执行时实现如下步骤:
    建立控制服务器与一个或多个存储节点的通讯连接,于该控制服务器中创建一个共享存储分配表;
    每隔预设时间,获取每个存储节点的实时工作状态信息,并将每个存储节点的实时工作状态信息写入所述共享存储分配表;及
    当接收到数据存储请求时,根据所述共享存储分配表中记录的每个存储节点的实时工作状态信息,选取特定存储节点保存该数据存储请求对应的数据。
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,每个存储节点包括一个主服务器和一个从服务器;
    所述共享存储分配表包括存储节点存储的数据、存储节点数组、及数据被分配在存储节点的位置,其中,所述存储节点数组用于记录存储节点的状态信息;及
    所述存储节点的状态信息包括存储节点的存储数据量、节点状态、节点是否活着、上一个节点和下一个节点、总容量、及负载因子。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述选取特定的存储节点保存该数据存储请求对应的数据包括:
    根据每个存储节点的剩余存储容量和负载因子大小,从所有存储节点中选取剩余存储容量满足该数据存储请求且负载因子最小的特定存储节点,其中,每个存储节点的剩余存储容量等于每个存储节点的总容量减去存储数据量;及
    将该数据存储请求对应的数据保存至该特定存储节点的主服务器存储单元中,并在所述共享存储分配表中记录该数据存储请求对应的数据在该特定存储节点的主服务器的存储单元地址。
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当该数据存储请求对应的数据保存至该特定存储节点的主服务器后,控制该特定存储节点开启数据同步进程,将该数据存储请求对应的数据复制到 该特定存储节点的从服务器存储单元中,并在所述共享存储分配表中记录该复制数据在该特定存储节点的从服务器存储单元地址。
  19. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
  20. 如权利要求18所述的计算机可读存储介质,其特征在于,所述分布式存储***被所述处理器执行时还用于实现如下步骤:
    当一个存储节点的主服务器停止工作时,在所述共享存储分配表中更新该存储节点的主服务器状态信息,并将该存储节点的备份服务器作为主服务器添加到所述共享存储分配表;及
    当一个存储节点的主服务器和从服务器都停止工作时,将该存储节点从所述共享存储分配表中删除,并将该存储节点的上一个节点连接至下一个节点。
PCT/CN2018/076172 2017-11-01 2018-02-10 分布式存储方法、控制服务器及计算机可读存储介质 WO2019085334A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711060240.0A CN107948248A (zh) 2017-11-01 2017-11-01 分布式存储方法、控制服务器及计算机可读存储介质
CN201711060240.0 2017-11-01

Publications (1)

Publication Number Publication Date
WO2019085334A1 true WO2019085334A1 (zh) 2019-05-09

Family

ID=61934099

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076172 WO2019085334A1 (zh) 2017-11-01 2018-02-10 分布式存储方法、控制服务器及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107948248A (zh)
WO (1) WO2019085334A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115718A (zh) * 2021-08-31 2022-03-01 济南浪潮数据技术有限公司 分布式块存储***服务质量控制方法、装置、设备及介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968259A (zh) * 2018-09-30 2020-04-07 武汉斗鱼网络科技有限公司 分步式对象存储***、对象储存方法及存储介质
CN109542352B (zh) * 2018-11-22 2020-05-08 北京百度网讯科技有限公司 用于存储数据的方法和装置
CN109739435B (zh) * 2018-12-03 2023-10-13 中科恒运股份有限公司 文件存储和更新方法及装置
CN109960587A (zh) * 2019-02-27 2019-07-02 厦门市世纪网通网络服务有限公司 超融合云计算***的存储资源分配方法和装置
CN110286852A (zh) * 2019-05-20 2019-09-27 平安科技(深圳)有限公司 双控构架分布式存储***、数据读取方法、装置和存储介质
CN110535969B (zh) * 2019-09-16 2021-06-15 腾讯科技(深圳)有限公司 基于区块链网络的数据存储方法、装置、存储介质和设备
CN110838938B (zh) * 2019-10-11 2021-09-07 成都飞机工业(集团)有限责任公司 一种基于工控网的dnc数据存储服务器调度方法
CN111124316B (zh) * 2019-12-30 2023-12-19 青岛海尔科技有限公司 存储空间的共享方法和装置及计算机可读存储介质
CN111190549A (zh) * 2019-12-30 2020-05-22 浪潮电子信息产业股份有限公司 一种共享卷可用容量获取方法、装置、设备及介质
CN111193804B (zh) * 2020-01-02 2022-09-09 深圳市网心科技有限公司 分布式存储方法及装置、网络节点及存储介质
CN113810439B (zh) * 2020-06-12 2023-02-03 华为技术有限公司 一种以太网存储***及其信息通告方法和相关装置
CN112637327B (zh) * 2020-12-21 2022-07-22 北京奇艺世纪科技有限公司 一种数据处理方法、装置及***

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540775A (zh) * 2009-04-30 2009-09-23 华为技术有限公司 内容分发方法、装置与内容分发网络***
CN103797770A (zh) * 2012-12-31 2014-05-14 华为技术有限公司 一种共享存储资源的方法和***
US20140215152A1 (en) * 2013-01-25 2014-07-31 ELTA Technology Co., Ltd. Expandable multimedia storage system, multimedia distribution device, and relevant computer program product
CN104219318A (zh) * 2014-09-15 2014-12-17 北京联创信安科技有限公司 一种分布式文件存储***及方法
US20160179618A1 (en) * 2009-12-29 2016-06-23 Cleversafe, Inc. Selecting storage units in a dispersed storage network
US20160226522A1 (en) * 2015-01-30 2016-08-04 International Business Machines Corporation Selecting a data storage resource of a dispersed storage network
US20170195420A1 (en) * 2015-12-30 2017-07-06 International Business Machines Corporation Detailed memory device statistics with drive write location determination

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143215B (zh) * 2011-01-20 2013-04-10 中国人民解放军理工大学 一种基于网络的pb级云存储***及其处理方法
CN102202087B (zh) * 2011-04-25 2015-04-01 中兴通讯股份有限公司 一种标识存储设备的方法及***
CN103019614B (zh) * 2011-09-23 2015-11-25 阿里巴巴集团控股有限公司 分布式存储***管理装置及方法
CN103229487B (zh) * 2012-12-27 2015-09-09 华为技术有限公司 分布式存储***中的分区平衡方法、装置及服务器
CN103124299A (zh) * 2013-03-21 2013-05-29 杭州电子科技大学 一种异构环境下的分布式块级别存储***
CN104378423B (zh) * 2014-11-13 2018-04-17 普华基础软件股份有限公司 元数据集群分布式存储***及读取、写入存储数据的方法
CN104967691B (zh) * 2015-07-08 2018-06-15 浪潮(北京)电子信息产业有限公司 一种分布式存储控制方法及***

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540775A (zh) * 2009-04-30 2009-09-23 华为技术有限公司 内容分发方法、装置与内容分发网络***
US20160179618A1 (en) * 2009-12-29 2016-06-23 Cleversafe, Inc. Selecting storage units in a dispersed storage network
CN103797770A (zh) * 2012-12-31 2014-05-14 华为技术有限公司 一种共享存储资源的方法和***
US20140215152A1 (en) * 2013-01-25 2014-07-31 ELTA Technology Co., Ltd. Expandable multimedia storage system, multimedia distribution device, and relevant computer program product
CN104219318A (zh) * 2014-09-15 2014-12-17 北京联创信安科技有限公司 一种分布式文件存储***及方法
US20160226522A1 (en) * 2015-01-30 2016-08-04 International Business Machines Corporation Selecting a data storage resource of a dispersed storage network
US20170195420A1 (en) * 2015-12-30 2017-07-06 International Business Machines Corporation Detailed memory device statistics with drive write location determination

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115718A (zh) * 2021-08-31 2022-03-01 济南浪潮数据技术有限公司 分布式块存储***服务质量控制方法、装置、设备及介质
CN114115718B (zh) * 2021-08-31 2024-03-29 济南浪潮数据技术有限公司 分布式块存储***服务质量控制方法、装置、设备及介质

Also Published As

Publication number Publication date
CN107948248A (zh) 2018-04-20

Similar Documents

Publication Publication Date Title
WO2019085334A1 (zh) 分布式存储方法、控制服务器及计算机可读存储介质
US9727268B2 (en) Management of storage in a storage network
WO2019085471A1 (zh) 数据库同步方法、应用服务器及计算机可读存储介质
US10657119B1 (en) Fleet node management system
US8930316B2 (en) System and method for providing partition persistent state consistency in a distributed data grid
JP6264666B2 (ja) データ格納方法、データストレージ装置、及びストレージデバイス
US10542073B2 (en) File transfer to a distributed file system
US20180285216A1 (en) Virtual Machine Recovery Method and Virtual Machine Management Device
WO2019000629A1 (zh) 多数据源数据同步方法、***、应用服务器及计算机可读存储介质
US20140237024A1 (en) Network communication devices and file tracking methods thereof
EP3147797B1 (en) Data management method, node and system for database cluster
WO2017032170A1 (zh) 镜像文件的导入方法及装置
CN110532123B (zh) HBase***的故障转移方法及装置
CN113111038B (zh) 文件存储方法、装置、服务器及存储介质
WO2017028375A1 (zh) 一种版本升级方法及***
WO2019056693A1 (zh) 接口代理方法及应用服务器
US20180129668A1 (en) Intermediate file processing method, client, server, and system
CN105574026A (zh) 非关系型数据库支持事务的方法及装置
WO2019071896A1 (zh) 网页地址去重方法、电子设备及计算机可读存储介质
CN112527561B (zh) 基于物联网云存储的数据备份方法及装置
US20180181310A1 (en) System and method for disk identification in a cloud based computing environment
EP3082050A1 (en) Mass data fusion storage method and system
JP2017208113A (ja) データ格納方法、データストレージ装置、及びストレージデバイス
WO2019153493A1 (zh) 基于h5页面的社交图谱生成方法、电子装置及存储介质
CN110688258A (zh) 一种快照创建方法及装置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18874762

Country of ref document: EP

Kind code of ref document: A1