WO2012171363A1 - 分布式缓存系统中的数据操作方法和装置 - Google Patents

分布式缓存系统中的数据操作方法和装置 Download PDF

Info

Publication number
WO2012171363A1
WO2012171363A1 PCT/CN2012/071828 CN2012071828W WO2012171363A1 WO 2012171363 A1 WO2012171363 A1 WO 2012171363A1 CN 2012071828 W CN2012071828 W CN 2012071828W WO 2012171363 A1 WO2012171363 A1 WO 2012171363A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
network element
data space
application
instruction
Prior art date
Application number
PCT/CN2012/071828
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 WO2012171363A1 publication Critical patent/WO2012171363A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/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/2866Architectures; Arrangements
    • H04L67/288Distributed intermediate devices, i.e. intermediate devices for interaction with other intermediate devices on the same level
    • 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

Definitions

  • the present invention relates to the field of communications, and in particular to a data operation method and apparatus in a distributed cache system.
  • BACKGROUND Cloud Computing is Grid Computing Distributed Computing, Parallel Computing, Utility Computing, Network Storage Technologies Virtualization Load balancing (Load Balance) and other traditional computer technology and network technology development products. It aims to integrate multiple relatively low-cost computing entities into a system with powerful computing power through the network.
  • Distributed caching is an area in the field of cloud computing. Its role is to provide distributed storage services for massive data and high-speed read and write access.
  • the present invention provides a data operation method and apparatus in a distributed cache system to at least solve the problem that the distributed cache system does not support multiple different attribute applications.
  • a data operation method in a distributed cache system including: accessing an application network element to a corresponding data space according to an application attribute of an application network element; wherein, the distributed cache system is configured There are multiple data spaces, each data space corresponding to one application attribute; receiving data operation instructions of the application network element; performing data operations in the data space according to the data operation instruction.
  • Each of the plurality of data spaces corresponds to a spatial identifier.
  • the method includes:: notifying the spatial identifier of the data space The application network element; the foregoing application network element accesses the corresponding data according to the application attribute of the application network element
  • the space includes: receiving an access instruction of the application network element, where the access instruction carries a data space identifier; determining, according to the data space identifier, a data space corresponding to the application network element; and applying the application network element to the determined data space.
  • the accessing the application network element to the corresponding data space according to the application attribute of the application network element further includes: when the data space corresponding to the application attribute of the application network element is not found, creating a data space according to the application attribute of the application network element, and according to The application attribute sets the attribute of the data space; the application network element is connected to the created data space.
  • the data operation performed in the data space according to the data operation instruction includes: storing the data in the storage instruction into the data space when the data operation instruction is a storage instruction; and reading from the data space when the data operation instruction is the read instruction Data matching the read command is output, and the read data is fed back to the application network element; when the data operation instruction is a delete instruction, the data matched with the delete instruction is deleted from the data space.
  • the attributes of each of the plurality of data spaces include: a replica mechanism (NRW), a hotspot data move in and out mechanism (LRU), and a multi-level storage mechanism; wherein the multi-level storage mechanism includes at least one of the following: Memory storage mode, combined storage mode of memory and solid state drive (SSD), combined storage mode of memory and hard disk, and combined storage mode of memory, SSD and hard disk.
  • a replica mechanism NFW
  • LRU hotspot data move in and out mechanism
  • multi-level storage mechanism includes at least one of the following: Memory storage mode, combined storage mode of memory and solid state drive (SSD), combined storage mode of memory and hard disk, and combined storage mode of memory, SSD and hard disk.
  • a data operation apparatus in a distributed cache system including: an access module, configured to access an application network element to a corresponding data space according to an application attribute of an application network element;
  • the distributed cache system is configured with multiple data spaces, each data space corresponding to one application attribute;
  • the instruction receiving module is configured to receive data operation instructions of the application network element; and
  • the data operation module is set to operate according to the data received by the instruction receiving module. Instruction, data manipulation in the data space.
  • the device further includes: an identifier notification module, configured to notify a corresponding application network element of the spatial identifier of the data space in advance when each of the plurality of data spaces respectively corresponds to a spatial identifier;
  • the method includes: an access instruction receiving unit, configured to receive an access instruction of an application network element, where the access instruction carries a data space identifier; and a data space determining unit, configured to be in an access instruction received according to the access instruction receiving unit
  • the data space identifier determines a data space corresponding to the application network element.
  • the first access unit is configured to access the application network element to the determined data space.
  • the access module further includes: a data space creation unit, configured to: when a data space corresponding to an application attribute of the application network element is not found, create a data space according to an application attribute of the application network element, and set an attribute of the data space according to the application attribute.
  • the second access unit is configured to connect the application network element to the data space created by the data space creation unit.
  • the data operation module includes: a data storage unit configured to store the data in the storage instruction into the data space when the data operation instruction is a storage instruction; and the data reading unit is set to be the data operation instruction as the read instruction The data is read from the data space and the read data is fed back to the application network element; the data deletion unit is set to delete and delete the data space when the data operation instruction is a delete instruction. Matching data.
  • FIG. 1 is a flow chart of a data operation method in a distributed cache system according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic structural diagram of a distributed cache system according to Embodiment 1 of the present invention
  • FIG. 4 is a flow chart of a data operation method based on the system provided by FIG. 2 according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic diagram of a message for operating data access to different data spaces according to different space numbers according to Embodiment 1 of the present invention
  • the embodiment of the present invention considers that the current distributed cache system only supports one attribute application, and has a limited limitation, and provides a data operation method and device in a distributed cache system, so that a distributed cache system can support A data space with multiple different attributes, each data space corresponding to different types of applications, such a distributed cache system can simultaneously support applications with multiple different attributes.
  • Embodiment 1 This embodiment provides a data operation method in a distributed cache system. Referring to FIG. 1, the method may be implemented on any server in a distributed cache system, including the following steps (step S102 - step S106) : Step S102: The application network element is connected to the corresponding data space according to the application attribute of the application network element. The distributed cache system is configured with multiple data spaces, and each data space corresponds to one application attribute.
  • the application network element refers to an entity that runs the application software, and may be a website or an application on a website. In the related technology, the application network element is also simply referred to as an “application”.
  • the correspondence between the data space and the application attribute in this embodiment may be one-to-one correspondence, and one application network element may store data of different application attributes in different data spaces.
  • Step S104 Receive a data operation instruction of the application network element. After the application network element accesses the distributed cache system, data operations can be performed as needed, for example, sending data operation instructions to the distributed cache system.
  • Step S106 performing data operations in the data space according to the data operation instruction.
  • each of the plurality of data spaces configured in the distributed cache system corresponds to one spatial identifier.
  • the method is performed before step S102.
  • the method further includes: notifying the corresponding application network element of the spatial identifier of the data space; the implementation of step S102 may include: receiving an access instruction of the application network element, where the access instruction carries a data space identifier; The spatial identifier determines a data space corresponding to the application network element; and the application network element is accessed to the determined data space.
  • the data space configured in the distributed cache system may not support the application attribute of the application network element. In this case, if the application network element accesses the distributed cache system, the application network needs to be used.
  • the foregoing step S102 further includes: when the data space corresponding to the application attribute of the application network element is not found, creating a data space according to the application attribute of the application network element, and setting the data space according to the application attribute. Attribute; access the created data space to the created data space.
  • each application network element has a corresponding data space.
  • the data operation performed in the data space according to the data operation instruction includes: when the data operation instruction is a storage instruction, the instruction is stored.
  • the data is stored in the corresponding data space; when the data operation instruction is a read instruction, the data matching the read instruction is read from the corresponding data space, and the read data is fed back to the application network element; When the data operation instruction is a delete instruction, the data matching the delete instruction is deleted from the corresponding data space.
  • the corresponding data space refers to a data space corresponding to an application network element that sends a data operation instruction.
  • the attributes of the above data space may include: a copy mechanism RW or a hotspot move in and out mechanism LRU.
  • the concept of application grouping is added to the distributed cache system. In a distributed cache system, multiple data spaces of different attributes are created, and applications with the same attributes are grouped into one group, and data is stored in the same space.
  • Step A The distributed cache system is started normally.
  • Step B Create a data space with multiple different attributes, the data space contains the following attributes: spaceid (space number, which is a form of the above space identifier), LRU (hotspot data move in and out mechanism), RW (copy mechanism), Multi-level storage (memory storage mode, memory + SSD (solid state drive) storage mode, memory + hard disk storage mode, memory + SSD + hard disk storage mode), etc., these attributes are juxtaposed.
  • each data space has a unique space number in the entire distributed cache system.
  • Step C According to the previously agreed RW, LRU and other mechanisms, the data space of different attributes is allocated to the application of different characteristics (that is, the application network element running the application software).
  • Step D accessing the application to the corresponding data space; for example, accessing the application of the same characteristic to the distributed cache system, performing data access operations on the same data space; and accessing applications with different characteristics to different attributes After the data space, related data access operations can be performed in the corresponding data space. Because each data space is relatively independent, the data in different data spaces will not cover and affect each other, so it can be guaranteed that the distributed cache system can simultaneously support applications with multiple different attributes.
  • FIG. 2 a schematic diagram of a network element structure of a data access based on a distributed cache system includes a plurality of applications (Application 1, Application 2, Application 3), a client, a distributed cache system, and a data storage server.
  • the distributed cache system is installed on multiple data storage servers to make it a cluster, which can be regarded as a storage device externally.
  • the application accesses the distributed cache system through the interface provided by the client in the system. .
  • the system is connected to different applications, and related operations such as storing, querying, and deleting data in different data spaces are described in detail: Step S302, after the distributed cache system is in normal operation, create data spaces of different attributes (attributes: RW, LRU, etc.), and each data space has a unique space number of the entire distributed cache system.
  • Step S304 the application accesses the distributed cache system through an interface provided by the system client.
  • Step S306 operating data in the corresponding data space according to an operation instruction of the application.
  • Embodiment 2 This embodiment provides a data operation device in a distributed cache system.
  • the device includes: an access module 52, configured to access an application network element according to an application attribute of an application network element. a data space; wherein the distributed cache system is configured with a plurality of data spaces, each data space corresponding to an application attribute; the instruction receiving module 54 is connected to the access module 52, and configured to receive the data operation instruction of the application network element.
  • the data operation module 56 is connected to the instruction receiving module 54 and configured to perform data operations in the data space according to the data operation instruction received by the instruction receiving module 54.
  • the device further includes: an identifier notification module, configured to notify the corresponding application network element of the spatial identifier of the data space in advance when each of the plurality of data spaces respectively corresponds to a spatial identifier; the access module 52
  • the method includes: an access instruction receiving unit, configured to receive an access instruction of an application network element, where the access instruction carries a data space identifier; a data space determining unit is connected to the access instruction receiving unit, and is set according to the access instruction The data space identifier in the access command received by the receiving unit determines the data space corresponding to the application network element; the first access unit is connected to the data space determining unit, and is configured to access the application network element to the determined data space.
  • the access module 52 further includes: a data space creating unit, configured to: when the data space corresponding to the application attribute of the application network element is not found, create a data space according to the application attribute of the application network element, and set according to the application attribute The attribute of the data space; the second access unit is configured to access the application network element to the data space created by the data space creation unit.
  • a data space creating unit configured to: when the data space corresponding to the application attribute of the application network element is not found, create a data space according to the application attribute of the application network element, and set according to the application attribute The attribute of the data space
  • the second access unit is configured to access the application network element to the data space created by the data space creation unit.
  • the data operation module 56 includes: a data storage unit configured to store the data in the storage instruction into the data space when the data operation instruction is a storage instruction; and the data reading unit is set to read when the data operation instruction is When the instruction is fetched, the data matching the read command is read from the data space, and the read data is fed back to the application network element; the data deletion unit is set to delete and delete from the data space when the data operation instruction is the delete instruction.
  • the data that the instruction matches.
  • the data space of the different attributes may be configured.
  • the attributes of the data space include: RW, LRU, and a multi-level storage mechanism.
  • the multi-level storage mechanism includes at least one of the following: a memory storage mode, Memory and solid state drive (SSD) combined storage mode, memory and hard disk combined storage mode, and memory, SSD and hard disk combined storage mode.
  • the distributed cache system allocates data spaces of different attributes according to different applications, so that applications of different attributes can perform data access operations in the data space of the corresponding attribute in the distributed cache system without interfering with each other to cause data. Confusion of access operations, etc.
  • the application network element is accessed to the corresponding data space, so that the application network element with different attributes accesses different data spaces, thereby solving the problem that the distributed cache system does not support multiple different attribute applications, and the system is improved. Utilization.
  • the above embodiment solves the problem that a distributed cache system can only support the same attribute application, does not support the application of multiple different attributes, and divides a distributed cache system into multiple
  • the data space of different attributes is used to support the application of multiple different attributes into several groups with the same attribute and access to the same distributed cache system at the same time, and the scalability of the system is greatly improved.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the computing device may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供了一种分布式缓存系统中的数据操作方法和装置。其中,该方法包括:根据应用网元的应用属性将应用网元接入对应的数据空间;其中,该分布式缓存系统中配置有多个数据空间,每个数据空间对应一个应用属性;接收该应用网元的数据操作指令;根据该数据操作指令在上述数据空间中进行数据操作。本发明解决了分布式缓存系统中不支持多种不同属性应用的问题,提高了系统的利用率。

Description

分布式缓存系统中的数据操作方法和装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种分布式缓存系统中的数据操作方法和 装置。 背景技术 云计算(Cloud Computing)是网格计算(Grid Computing ) 分布式计算(Distributed Computing )、 并行计算 (Parallel Computing )、 效用计算 (Utility Computing )、 网络存 储 (Network Storage Technologies ) 虚拟化 ( Virtualization) 负载均衡 (Load Balance) 等传统计算机技术和网络技术发展融合的产物。 它旨在通过网络把多个成本相对较低 的计算实体整合成一个具有强大计算能力的系统。 分布式缓存是云计算范畴中的一个 领域, 其作用是提供海量数据的分布式存储服务以及高速读写访问的能力。 现有的分布式缓存系统中, 一个系统只能支持属性相同的应用 ( RW副本机制, LRU热点移入移出机制等属性); 而对于不同属性的应用, 没法做到在同一个系统中 共存 (因为上述这些属性为整个系统的全局属性, 并非是某个特定数据空间的属性), 导致无法实现同一个分布式缓存系统中可以支持多种不同属性应用的场景。 针对相关技术中上述分布式缓存系统中不支持多种不同属性应用的问题, 目前尚 未提出有效的解决方案。 发明内容 本发明提供了一种分布式缓存系统中的数据操作方法和装置, 以至少解决上述分 布式缓存系统中不支持多种不同属性应用的问题。 根据本发明的一个方面, 提供了一种分布式缓存系统中的数据操作方法, 包括: 根据应用网元的应用属性将应用网元接入对应的数据空间; 其中, 该分布式缓存系统 中配置有多个数据空间, 每个数据空间对应一个应用属性; 接收该应用网元的数据操 作指令; 根据该数据操作指令在上述数据空间中进行数据操作。 其中, 上述多个数据空间中的每个数据空间分别对应一个空间标识; 根据应用网 元的应用属性将应用网元接入对应的数据空间之前, 该方法包括: 将数据空间的空间 标识通知对应的应用网元; 上述根据应用网元的应用属性将应用网元接入对应的数据 空间包括: 接收应用网元的接入指令, 其中, 接入指令携带有数据空间标识; 根据数 据空间标识确定应用网元对应的数据空间; 将应用网元接入确定的数据空间。 上述根据应用网元的应用属性将应用网元接入对应的数据空间还包括: 当未找到 与应用网元的应用属性对应的数据空间时, 根据应用网元的应用属性创建数据空间, 并根据应用属性设置数据空间的属性; 将应用网元接入创建的数据空间。 其中, 上述根据数据操作指令在数据空间中进行数据操作包括: 当数据操作指令 为存储指令时, 将存储指令中的数据存入数据空间; 当数据操作指令为读取指令时, 从数据空间读出与读取指令匹配的数据, 并将读出的数据反馈给应用网元; 当数据操 作指令为删除指令时, 从数据空间删除与删除指令匹配的数据。 其中, 上述多个数据空间中的每个数据空间的属性包括: 副本机制 (NRW)、 热 点数据移入移出机制 (LRU) 和多级存储机制; 其中, 该多级存储机制包括以下至少 之一: 内存存储模式、 内存与固态硬盘 (SSD) 的组合存储模式、 内存与硬盘的组合 存储模式, 以及内存、 SSD与硬盘的组合存储模式。 根据本发明的另一方面, 提供了一种分布式缓存系统中的数据操作装置, 包括: 接入模块, 设置为根据应用网元的应用属性将应用网元接入对应的数据空间; 其中, 分布式缓存系统中配置有多个数据空间, 每个数据空间对应一个应用属性; 指令接收 模块, 设置为接收应用网元的数据操作指令; 数据操作模块, 设置为根据指令接收模 块接收的数据操作指令, 在数据空间中进行数据操作。 其中, 该装置还包括: 标识通知模块, 设置为当多个数据空间中的每个数据空间 分别对应一个空间标识时, 预先将数据空间的空间标识通知给对应的应用网元; 上述 接入模块包括: 接入指令接收单元, 设置为接收应用网元的接入指令, 其中, 接入指 令携带有数据空间标识; 数据空间确定单元, 设置为根据接入指令接收单元接收的接 入指令中的数据空间标识确定应用网元对应的数据空间; 第一接入单元, 设置为将应 用网元接入确定的数据空间。 上述接入模块还包括: 数据空间创建单元, 设置为当未找到与应用网元的应用属 性对应的数据空间时, 根据应用网元的应用属性创建数据空间, 并根据应用属性设置 数据空间的属性; 第二接入单元, 设置为将应用网元接入数据空间创建单元创建的数 据空间。 上述数据操作模块包括: 数据存储单元, 设置为当数据操作指令为存储指令时, 将存储指令中的数据存入数据空间; 数据读取单元, 设置为当数据操作指令为读取指 令时, 从数据空间读出与读取指令匹配的数据, 并将读出的数据反馈给应用网元; 数 据删除单元, 设置为当数据操作指令为删除指令时, 从数据空间删除与删除指令匹配 的数据。 通过本发明, 采用将应用网元接入到对应的数据空间, 使不同属性的应用网元接 入不同的数据空间, 解决了分布式缓存系统中不支持多种不同属性应用的问题, 提高 了系统的利用率。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例 1的分布式缓存系统中的数据操作方法流程图; 图 2是根据本发明实施例 1的分布式缓存系统的结构示意图; 图 3是根据本发明实施例 1的基于图 2提供的系统的数据操作方法流程图; 图 4是根据本发明实施例 1的数据存取根据不同空间号对不同数据空间进行操作 的消息示意图; 图 5是根据本发明实施例 2的分布式缓存系统中的数据操作装置的结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 本发明实施例考虑目前的分布式缓存系统只支持一种属性的应用, 局限性较大的 问题, 提供了一种分布式缓存系统中的数据操作方法和装置, 使一个分布式缓存系统 能支持多个不同属性的数据空间, 每个数据空间对应不同类型的应用, 这样一个分布 式缓存系统就可以同时支持多种不同属性的应用。 实施例 1 本实施例提供了一种分布式缓存系统中的数据操作方法, 参见图 1, 该方法可以 在分布式缓存系统中的任意一个服务器上实现,包括以下步骤(步骤 S102-步骤 S106): 步骤 S102, 根据应用网元的应用属性将应用网元接入对应的数据空间; 其中, 该 分布式缓存系统中配置有多个数据空间, 每个数据空间对应一个应用属性。 其中, 应用网元指运行应用软件的实体, 其可以是一个网站, 也可以是某网站上 的一个应用程序, 相关技术中, 也将应用网元直接简称为"应用"。 本实施例中的数据空间与应用属性的对应关系可以是一一对应, 一个应用网元可 以将不同应用属性的数据存储在不同的数据空间上。 步骤 S104, 接收应用网元的数据操作指令。 应用网元接入分布式缓存系统后, 将可以根据需要进行数据操作, 例如, 向分布 式缓存系统发送数据操作指令等。 步骤 S106, 根据数据操作指令在上述数据空间中进行数据操作。 本实施例中, 上述分布式缓存系统中配置的多个数据空间中的每个数据空间分别 对应一个空间标识; 为了简化分布式缓存系统与应用网元间的操作, 上述步骤 S102 之前,该方法还包括:将数据空间的空间标识通知对应的应用网元;基于此,步骤 S102 的实现可以包括: 接收该应用网元的接入指令, 其中, 该接入指令携带有数据空间标 识; 根据数据空间标识确定该应用网元对应的数据空间; 将该应用网元接入确定的数 据空间。 对于新的应用网元, 有时分布式缓存系统中配置的数据空间可能不支持该应用网 元的应用属性, 此时, 若该应用网元接入该分布式缓存系统时, 需要为该应用网元创 建一个数据空间, 基于此, 上述步骤 S102还包括: 当未找到与应用网元的应用属性对 应的数据空间时, 根据应用网元的应用属性创建数据空间, 并根据应用属性设置数据 空间的属性; 将应用网元接入创建的数据空间。 通过上述步骤 S102的操作, 每个应用网元会有一个对应数据空间, 基于此, 上述 根据数据操作指令在数据空间中进行数据操作包括: 当上述数据操作指令为存储指令 时, 将存储指令中的数据存入对应的数据空间; 当上述数据操作指令为读取指令时, 从对应的数据空间读出与读取指令匹配的数据, 并将读出的数据反馈给该应用网元; 当上述数据操作指令为删除指令时, 从对应的数据空间删除与删除指令匹配的数据。 其中, 对应的数据空间指与发送数据操作指令的应用网元对应的数据空间。 上述数据空间的属性可以包括: 副本机制 RW或热点移入移出机制 LRU。 本实施例将应用分组的概念加入到分布式缓存系统中,在一个分布式缓存系统中, 创建多个不同属性的数据空间, 属性相同的应用归为一组, 在同一个空间上进行数据 存取; 属性不同的应用, 则在不同的数据空间进行数据的存取, 保证了不同的应用能 够在同一个系统中共存, 且相互独立, 互不影响。 本实施例通过将应用网元接入到对应的数据空间, 使不同属性的应用网元接入不 同的数据空间, 解决了分布式缓存系统中不支持多种不同属性应用的问题, 提高了系 统的利用率。 并且, 在硬件资源足够的情况下, 只需新增数据空间, 即可实现系统的 平滑扩展。 下面对上述分布式缓存系统中的数据操作方法进行详细介绍, 其包括如下步骤: 步骤 A: 正常启动分布式缓存系统。 步骤 B: 创建多个不同属性的数据空间, 该些数据空间包含以下属性: spaceid (空 间号, 是上述空间标识的一种形式), LRU (热点数据移入移出机制), RW (副本机 制), 多级存储 (内存存储模式、 内存 +SSD (固态硬盘)存储模式, 内存 +硬盘存储模 式, 内存 +SSD+硬盘存储模式) 等, 这几个属性是并列的。 本实施例中, 每个数据空 间都有一个在整个分布式缓存系统中唯一的空间号。 步骤 C: 根据事先约定好的 RW、 LRU等机制, 将不同属性的数据空间分配给 不同特性的应用 (即运行应用软件的应用网元)。 步骤 D: 将应用接入对应的数据空间; 例如, 将相同特性的应用接入分布式缓存 系统后, 在同一个数据空间上进行数据的存取操作; 将不同特性的应用接入不同属性 的数据空间后, 可以在对应的数据空间进行相关的数据存取操作。 因为每个数据空间 相对独立, 不同数据空间中的数据不会互相覆盖、 影响, 因此可以保证该分布式缓存 系统可以同时支持多种不同属性的应用。 参见图 2所示的基于分布式缓存系统的数据存取的网元结构示意图, 该系统包括 多个应用 (应用 1、 应用 2、 应用 3 )、 客户端、 分布式缓存系统和数据存储服务器。 其中, 分布式缓存系统安装布置在多个数据存储服务器上, 使之成为一个集群, 对外 可视作是一个存储设备, 应用通过本系统中客户端提供的接口, 接入到分布式缓存系 统中。 下面结合图 3针对不同的应用连上系统, 并且在不同的数据空间上进行数据的存 储、 查询和删除等相关的操作过程进行详细的描述: 步骤 S302,分布式缓存系统正常运行后,创建不同属性的数据空间(属性: RW、 LRU等), 每个数据空间都有一个整个分布式缓存系统唯一的空间号。 步骤 S304, 应用通过系统客户端提供的接口来接入本分布式缓存系统。 步骤 S306, 根据应用的操作指令对相应数据空间中的数据进行操作。 参见图 4 所示的数据存取根据不同空间号对不同数据空间进行操作的消息示意 图, 其中, 应用在进行设置 (set)、 获取 (get)、 删除 (delete) 相关数据时, 发送的 接入消息中带上了相应的空间号, 以及指针 (Key) 和指针长度等信息, 这样就明确 了该应用是接入到某个特定的数据空间, 然后在该空间上对数据进行相关的 set、 get、 delete操作。 上述方法还可以应用在以后的系统扩展中, 如有新的属性的应用要利用本系统来 进行数据的存取, 则只需在本系统中, 新增一个数据空间, 配置其相关属性满足该新 的应用, 并且将该空间号告知给应用, 使该应用能够在该数据空间上进行数据存取。 这样, 就能顺利的实现该应用在本系统中进行数据的存取, 也轻松的实现了本分布式 缓存系统的扩展, 使本系统的易扩展性得到了体现。 实施例 2 本实施例提供了一种分布式缓存系统中的数据操作装置, 参见图 5, 该装置包括: 接入模块 52, 设置为根据应用网元的应用属性将应用网元接入对应的数据空间; 其中, 该分布式缓存系统中配置有多个数据空间, 每个数据空间对应一个应用属性; 指令接收模块 54, 与接入模块 52相连, 设置为接收上述应用网元的数据操作指 令; 数据操作模块 56, 与指令接收模块 54相连, 设置为根据指令接收模块 54接收的 数据操作指令, 在该数据空间中进行数据操作。 其中, 该装置还包括: 标识通知模块, 设置为当多个数据空间中的每个数据空间 分别对应一个空间标识时, 预先将数据空间的空间标识通知给对应的应用网元; 接入 模块 52包括: 接入指令接收单元, 设置为接收应用网元的接入指令, 其中, 该接入指 令携带有数据空间标识; 数据空间确定单元, 与接入指令接收单元相连, 设置为根据 接入指令接收单元接收的接入指令中的数据空间标识确定应用网元对应的数据空间; 第一接入单元, 与数据空间确定单元相连, 设置为将该应用网元接入确定的数据空间。 优选地, 接入模块 52还包括: 数据空间创建单元, 设置为当未找到与应用网元的 应用属性对应的数据空间时, 根据该应用网元的应用属性创建数据空间, 并根据应用 属性设置数据空间的属性; 第二接入单元, 设置为将该应用网元接入数据空间创建单 元创建的数据空间。 基于上述数据空间, 数据操作模块 56包括: 数据存储单元, 设置为当数据操作指 令为存储指令时, 将存储指令中的数据存入数据空间; 数据读取单元, 设置为当数据 操作指令为读取指令时, 从数据空间读出与读取指令匹配的数据, 并将读出的数据反 馈给应用网元; 数据删除单元, 设置为当数据操作指令为删除指令时, 从数据空间删 除与删除指令匹配的数据。 本实施例在系统启动后, 可以配置多个不同属性的数据空间, 数据空间的属性包 括: RW、 LRU和多级存储机制; 其中, 该多级存储机制包括以下至少之一: 内存存 储模式、 内存与固态硬盘 (SSD ) 组合存储模式、 内存与硬盘组合存储模式, 以及内 存、 SSD与硬盘组合存储模式。 分布式缓存系统根据不同的应用, 分配不同属性的数 据空间, 使不同属性的应用在分布式缓存系统中能在对应属性的数据空间中进行数据 的存取等操作, 而不会互相干扰导致数据存取操作等的混乱。 本实施例通过将应用网元接入到对应的数据空间, 使不同属性的应用网元接入不 同的数据空间, 解决了分布式缓存系统中不支持多种不同属性应用的问题, 提高了系 统的利用率。 并且, 在硬件资源足够的情况下, 只需新增数据空间, 即可实现系统的 平滑扩展。 从以上的描述中可以看出, 上述实施例解决了一个分布式缓存系统只能支持同一 属性的应用, 不支持多种不同属性的应用同时接入的局限性, 将一个分布式缓存系统 分成多个不同属性的数据空间, 用来支持多个不同属性的应用分成属性相同的几个组 同时接入同一个分布式缓存系统, 并且使系统的可扩展性得到了大大的提升。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

1. 一种分布式缓存系统中的数据操作方法, 包括:
根据应用网元的应用属性将所述应用网元接入对应的数据空间; 其中, 所 述分布式缓存系统中配置有多个数据空间, 每个数据空间对应一个应用属性; 接收所述应用网元的数据操作指令;
根据所述数据操作指令在所述数据空间中进行数据操作。
2. 根据权利要求 1所述的方法, 其中, 所述多个数据空间中的每个数据空间分别 对应一个空间标识; 所述根据应用网元的应用属性将所述应用网元接入对应的数据空间之前, 所述方法包括: 将所述数据空间的空间标识通知对应的应用网元;
所述根据应用网元的应用属性将所述应用网元接入对应的数据空间包括: 接收应用网元的接入指令, 其中, 所述接入指令携带有数据空间标识; 根据所 述数据空间标识确定所述应用网元对应的数据空间; 将所述应用网元接入确定 的所述数据空间。
3. 根据权利要求 1所述的方法, 其中, 所述根据应用网元的应用属性将所述应用 网元接入对应的数据空间还包括:
当未找到与所述应用网元的应用属性对应的数据空间时, 根据所述应用网 元的应用属性创建数据空间, 并根据所述应用属性设置所述数据空间的属性; 将所述应用网元接入创建的所述数据空间。
4. 根据权利要求 1所述的方法, 其中, 所述根据所述数据操作指令在所述数据空 间中进行数据操作包括:
当所述数据操作指令为存储指令时, 将所述存储指令中的数据存入所述数 据空间;
当所述数据操作指令为读取指令时, 从所述数据空间读出与所述读取指令 匹配的数据, 并将读出的数据反馈给所述应用网元;
当所述数据操作指令为删除指令时, 从所述数据空间删除与所述删除指令 匹配的数据。
5. 根据权利要求 1-4任一项所述的方法, 其中, 所述多个数据空间中的每个数据 空间的属性包括: 副本机制 RW、 热点数据移入移出机制 LRU和多级存储机 制; 其中, 所述多级存储机制包括以下至少之一: 内存存储模式、 内存与固态 硬盘 SSD的组合存储模式、 内存与硬盘的组合存储模式, 以及内存、 SSD与硬 盘的组合存储模式。
6. 一种分布式缓存系统中的数据操作装置, 包括:
接入模块, 设置为根据应用网元的应用属性将所述应用网元接入对应的数 据空间; 其中, 所述分布式缓存系统中配置有多个数据空间, 每个数据空间对 应一个应用属性;
指令接收模块, 设置为接收所述应用网元的数据操作指令;
数据操作模块, 设置为根据所述指令接收模块接收的所述数据操作指令, 在所述数据空间中进行数据操作。
7. 根据权利要求 6所述的装置, 其中,
所述装置还包括: 标识通知模块, 设置为当所述多个数据空间中的每个数 据空间分别对应一个空间标识时, 预先将所述数据空间的空间标识通知给对应 的应用网元;
所述接入模块包括:接入指令接收单元,设置为接收应用网元的接入指令, 其中, 所述接入指令携带有数据空间标识; 数据空间确定单元, 设置为根据所 述接入指令接收单元接收的接入指令中的所述数据空间标识确定所述应用网元 对应的数据空间; 第一接入单元, 设置为将所述应用网元接入确定的所述数据 空间。
8. 根据权利要求 6所述的装置, 其中, 所述接入模块还包括:
数据空间创建单元, 设置为当未找到与所述应用网元的应用属性对应的数 据空间时, 根据所述应用网元的应用属性创建数据空间, 并根据所述应用属性 设置所述数据空间的属性;
第二接入单元, 设置为将所述应用网元接入所述数据空间创建单元创建的 所述数据空间。
9. 根据权利要求 6所述的装置, 其中, 所述数据操作模块包括: 数据存储单元, 设置为当所述数据操作指令为存储指令时, 将所述存储指 令中的数据存入所述数据空间;
数据读取单元, 设置为当所述数据操作指令为读取指令时, 从所述数据空 间读出与所述读取指令匹配的数据, 并将读出的数据反馈给所述应用网元; 数据删除单元, 设置为当所述数据操作指令为删除指令时, 从所述数据空 间删除与所述删除指令匹配的数据。
PCT/CN2012/071828 2011-06-17 2012-03-01 分布式缓存系统中的数据操作方法和装置 WO2012171363A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110164485.4A CN102833295B (zh) 2011-06-17 2011-06-17 分布式缓存系统中的数据操作方法和装置
CN201110164485.4 2011-06-17

Publications (1)

Publication Number Publication Date
WO2012171363A1 true WO2012171363A1 (zh) 2012-12-20

Family

ID=47336265

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/071828 WO2012171363A1 (zh) 2011-06-17 2012-03-01 分布式缓存系统中的数据操作方法和装置

Country Status (2)

Country Link
CN (1) CN102833295B (zh)
WO (1) WO2012171363A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468651B (zh) * 2013-09-17 2019-09-10 南京中兴新软件有限责任公司 分布式多副本数据存储方法及装置
CN106503058B (zh) * 2016-09-27 2019-01-18 华为技术有限公司 一种数据加载方法、终端和计算集群
CN109240609B (zh) * 2018-08-23 2022-02-18 郑州云海信息技术有限公司 一种基于aep内存的数据空间读写方法及系统
CN111628986A (zh) * 2020-05-22 2020-09-04 广东电网有限责任公司 交互数据处理方法、系统、装置、计算机设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6182151B1 (en) * 1996-07-29 2001-01-30 International Business Machines Corporation Method and apparatus for batch storage of objects in a client-server storage management system
CN1842794A (zh) * 2004-08-05 2006-10-04 国际商业机器公司 用于管理属性位于多个数据库中的数据库记录的方法、系统和计算机程序产品
CN101840410A (zh) * 2009-01-28 2010-09-22 索尼公司 学习装置和方法、信息处理装置和方法以及程序

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100420204C (zh) * 2006-07-05 2008-09-17 华为技术有限公司 网元状态存储控制装置及其方法、监测装置及其方法
CN101727457B (zh) * 2008-10-30 2012-08-08 爱思开电讯投资(中国)有限公司 用于智能卡的数据库管理系统和方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6182151B1 (en) * 1996-07-29 2001-01-30 International Business Machines Corporation Method and apparatus for batch storage of objects in a client-server storage management system
CN1842794A (zh) * 2004-08-05 2006-10-04 国际商业机器公司 用于管理属性位于多个数据库中的数据库记录的方法、系统和计算机程序产品
CN101840410A (zh) * 2009-01-28 2010-09-22 索尼公司 学习装置和方法、信息处理装置和方法以及程序

Also Published As

Publication number Publication date
CN102833295B (zh) 2017-11-10
CN102833295A (zh) 2012-12-19

Similar Documents

Publication Publication Date Title
WO2016180055A1 (zh) 数据存储、读取的方法、装置及系统
EP2891051B1 (en) Block-level access to parallel storage
US9052824B2 (en) Content addressable stores based on sibling groups
KR20200027413A (ko) 데이터 저장 방법, 장치 및 시스템
WO2017167171A1 (zh) 一种数据操作方法,服务器及存储系统
TW201220197A (en) for improving the safety and reliability of data storage in a virtual machine based on cloud calculation and distributed storage environment
JP5975501B2 (ja) コンピューティングシステムにおいてストレージデータの暗号化不要の整合性保護を促進するメカニズム
US20130036272A1 (en) Storage engine node for cloud-based storage
US9424314B2 (en) Method and apparatus for joining read requests
US10860604B1 (en) Scalable tracking for database udpates according to a secondary index
US9110820B1 (en) Hybrid data storage system in an HPC exascale environment
US10169348B2 (en) Using a file path to determine file locality for applications
CN113672175A (zh) 分布式对象存储方法、装置和设备及计算机存储介质
US11675499B2 (en) Synchronous discovery logs in a fabric storage system
US20220124152A1 (en) Tiered Queuing System
US9600486B2 (en) File system directory attribute correction
WO2018054079A1 (zh) 一种存储文件的方法、第一虚拟机及名称节点
CN106570113B (zh) 一种海量矢量切片数据云存储方法及系统
JP2018049653A (ja) キャッシュ管理
EP3384384A1 (en) Methods and devices for acquiring data using virtual machine and host machine
CN104144202A (zh) Hadoop分布式文件系统的访问方法、系统和装置
US20200349081A1 (en) Method, apparatus and computer program product for managing metadata
CN113806300A (zh) 数据存储方法、系统、装置、设备及存储介质
WO2012171363A1 (zh) 分布式缓存系统中的数据操作方法和装置
WO2014153931A1 (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: 12799912

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

Country of ref document: EP

Kind code of ref document: A1