WO2017174013A1 - 数据存储管理方法、装置及数据存储系统 - Google Patents

数据存储管理方法、装置及数据存储系统 Download PDF

Info

Publication number
WO2017174013A1
WO2017174013A1 PCT/CN2017/079630 CN2017079630W WO2017174013A1 WO 2017174013 A1 WO2017174013 A1 WO 2017174013A1 CN 2017079630 W CN2017079630 W CN 2017079630W WO 2017174013 A1 WO2017174013 A1 WO 2017174013A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
stored
file system
storage
distributed file
Prior art date
Application number
PCT/CN2017/079630
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 WO2017174013A1 publication Critical patent/WO2017174013A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Definitions

  • the present disclosure relates to the field of big data storage, for example, to a data storage management method, apparatus, and data storage system.
  • Big data usually refers to data sets that are large, difficult to collect, process, and analyze, and those that are stored for long periods of time in traditional infrastructure. Efficient storage and management of massive messages is the cornerstone of big data development. Only all messages output by multiple business systems are stored correctly, and users can display, retrieve, create, save, delete, and query messages through at least one of the client and the web browser, or through the client and web browser. At least one of the directories performs a directory operation (new, rename, delete, and select).
  • the present disclosure provides a data storage management method, device and data storage system, which avoids the phenomenon that all mass data are stored in the same storage manner, and the messages stored in the DFS system can be managed in the database, and the implementation cost is low. Easy to deploy and easy to read data.
  • the present disclosure provides a data storage management method, including:
  • the messages stored in the distributed file system are managed based on the storage information stored in the database and the standardized metadata.
  • the message to be stored is stored in the distributed file system
  • the obtaining the storage information includes: storing the message to be stored and the message attachment thereof in a file format in the distributed file system, and receiving the message storage path returned by the distributed file system.
  • the method further includes: determining a keyword value of the message.
  • managing the message stored in the distributed file system includes: performing at least one operation of reading the corresponding message and aging the corresponding message based on the keyword value.
  • the metadata includes a data size
  • storing the message to the distributed file system includes: when the data size is greater than a preset threshold, determining that the message is a long message, storing the message to the distributed file system ;
  • the method further includes: when the data size is less than or equal to a preset threshold, determining that the message is a short message, storing the message in a database.
  • the present disclosure provides a data storage management apparatus, including:
  • a communication module configured to receive a message to be stored, and normalize metadata of the message to be stored
  • a storage module configured to store the message to be stored to the distributed file system, obtain the storage information, and store the stored information and the standardized metadata in a database
  • the management module is configured to manage messages stored in the distributed file system based on the stored information stored in the database and the standardized metadata.
  • the storage module is configured to: store the message to be stored and its message attachment in a file format in the distributed file system, and receive a message storage path returned by the distributed file system.
  • the storage module is further configured to determine a keyword value of the message after storing the stored information and the metadata in the database.
  • the management module is configured to perform at least one of reading a corresponding message and an aging corresponding message based on the keyword value.
  • the metadata includes a data size; the storage module is configured to: when the data size is greater than a preset threshold, determine that the message is a long message, store the message to the distributed file system; and the storage module is further configured to be If the data size is less than or equal to the preset threshold, and the message is determined to be a short message, the message is stored in the database.
  • the present disclosure provides a data storage system comprising: a database, a distributed file system, and any of the above data storage management devices.
  • the disclosure also provides a data storage management method, including:
  • the messages stored in the distributed file system are managed based on the stored information and the standardized metadata stored in the database.
  • the present disclosure also provides a computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • the present disclosure also provides an electronic device, the electronic device comprising:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • the embodiment provides a data storage management method, and receives the stored message to be stored, normalizes the metadata of the message to be stored, and determines that the metadata satisfies the preset condition, and stores the message in the DFS system. Obtaining the storage information, sending the storage information and the metadata to the database, and managing the messages stored in the DFS system in the database, avoiding the phenomenon that all the massive data are stored in the same storage manner, the implementation cost is low, and the deployment is easy. The data is easy to read.
  • FIG. 1 is a schematic structural diagram of a data storage management apparatus according to a first embodiment
  • FIG. 2 is a flowchart of a data storage management method provided by the second embodiment
  • FIG. 3 is a schematic diagram of networking of a data storage system according to a third embodiment
  • FIG. 5 is a schematic diagram showing the hardware structure of an electronic device in an embodiment.
  • a large number of messages are stored in a Distributed File System (DFS), or a large number of messages are stored in a database, and all of the massive data is stored and managed in the same storage mode.
  • DFS Distributed File System
  • the data storage management apparatus 1 is a schematic structural diagram of a data storage management apparatus provided by a first embodiment, and the apparatus may be stored in an electronic device.
  • the data storage management apparatus 1 provided by the present invention includes a communication module 11, a storage module, and a 12 management module 13.
  • the communication module 11 is arranged to receive the message to be stored and to normalize the metadata of the message to be stored.
  • the electronic device can receive multiple types of terminals, Rich Communication Suite (RCS), Short Message Service Center (SMSC), Virtual Memory System (VMS), and The message to be stored sent by the three-party system.
  • RCS Rich Communication Suite
  • SMSC Short Message Service Center
  • VMS Virtual Memory System
  • the electronic device After receiving the message to be stored, the electronic device performs standard on the message and the metadata of the message. Processing.
  • the storage module 12 is configured to store the message to be stored to the distributed file system, obtain the storage information of the message, and store the storage information and the metadata of the message in the database.
  • the metadata is standardized metadata.
  • the management module 13 is configured to manage messages stored in the distributed file system based on stored information and metadata stored in the database.
  • the storage module 12 in the above embodiment may be configured to store the message to be stored and its message attachment in a file format in a distributed file system, and receive a message storage path returned by the distributed file system.
  • the message attachment may refer to a file in TXT format in the message to be stored.
  • the storage module 12 in the above embodiment may be configured to determine the key value of the message according to the standardized metadata after storing the stored information and the metadata in the database.
  • the management module 13 in the foregoing embodiment may be configured to perform at least one of reading a corresponding message and an aging corresponding message based on the keyword value.
  • the metadata in the above embodiment may include a data size; the storage module 12 may be configured to determine whether the message to be stored is a long message or a short message according to the data size; compare the data size with a preset threshold, when the data If the size is greater than the preset threshold, the message is determined to be a long message, and the message is stored in the distributed file system; and when the data size is less than or equal to the preset threshold, determining that the message is a short message, storing the message to be stored In the database.
  • the preset threshold may be a data size determined by an operator according to operating experience, or may be a default value of the system.
  • the data size is used as a comparison threshold, and the data of the message to be stored is greater than the threshold, thereby determining the size of the message to be stored.
  • the storage location of the to-be-stored message is determined according to the size of the message to be stored.
  • the embodiment provides a data storage system, which includes a database, a distributed file system, and a data storage management device provided by the foregoing embodiments.
  • the data storage management method provided in this embodiment includes the following steps.
  • step 210 a message to be stored is received, and metadata of the message to be stored is normalized.
  • step 220 the message to be stored is stored in the distributed file system, the storage information of the message is obtained, and the storage information and the metadata are stored in the database.
  • step 230 the messages stored in the distributed file system are managed based on the stored information and metadata stored in the database.
  • the storing the message to be stored in the distributed file system in the foregoing embodiment, the obtaining the storage information may include: storing the message to be stored and the message attachment thereof in a file format in the distributed file system, and receiving the distributed file.
  • the storage information may include a message storage path.
  • the data storage management method may further include: determining a keyword value of the message according to the standardized metadata.
  • managing the message stored in the distributed file system in the foregoing embodiment may include: performing at least one of reading the corresponding message and aging the corresponding message based on the keyword value.
  • the metadata in the foregoing embodiment may include a data size
  • the method may further include: determining, according to the data size, whether the message to be stored is a long message or a short message; comparing the data size with a preset threshold, When the data size is greater than the preset threshold, determining that the message is a long message, storing the message to the distributed file system; and when the data size is less than or equal to the preset threshold, determining that the message is a short message, and storing the message in the message database.
  • This embodiment provides a method for separately storing mass messages according to file size.
  • the data storage system includes a third party message system, a message engine module 301, a message management module 302, a database 303, and a DFS storage system. 304 and other network elements.
  • the database 303 can be HBASE.
  • the message engine module 301 communicates with various types of terminals, Rich Communication Suite (RCS), Short Message Service Center (SMSC), Virtual Memory System (VMS), and other third parties, respectively.
  • the system communicates.
  • the database 303 includes a metadata message management module (including a Network File System (NFS) client), a distributed service framework (Zookeeper), a Hadoop-based data warehouse tool (Hive), and a Lucene-based search server (Elasticsearch). ), Big Data Distributed Programming Framework (Spark), Yet Another Resource Negotiator (YARN), Distributed Column Storage System (Hbase), Hadoop Distributed File System (HDFS), Distribution Log collection system (Flume).
  • the DFS storage system 304 includes an NFS server.
  • the technical solution adopted in this embodiment is that the message engine module preprocesses the mass message and normalizes the metadata information of the mass message itself (including message host information, message status, message type, message source, message directory, and encoding). Type, message identification (ID), message size (size), message subject, message delivery method, message content, etc., according to the content size attribute (ie file size) in the pre-processed result, the message size can be exceeded.
  • the 2M message and the attachment file of the message are stored in the DFS storage system.
  • the message directory whose message size is less than or equal to 2M and the attachment directory of the message can be serialized into a string by the message management module and stored in the column database HBASE to establish a key value (
  • the index value of keyvalue, through the index value, can be used for daily management, analysis, and statistics of messages such as reading, deleting, and periodic aging of files.
  • the preset threshold is set to 2M, and the message size is compared with the preset threshold.
  • the message size exceeds 2M, the message is determined to be a long message; when the message size is less than or equal to 2M, the message is determined.
  • the 2M here is only an example of a preset threshold, and is not a limitation on the value of the preset threshold.
  • the file size, data size, and message size mentioned in the foregoing embodiments refer to the size of the storage space that the metadata of the message needs to occupy.
  • the metadata of a message can take up a few M of storage space, or take up a few K of storage space.
  • Data storage management can include message injection, message reading and use, and message data storage. new.
  • Message injection can include the following steps.
  • the message engine module performs standardization preprocessing on the stored message, and determines whether the message to be stored is a long message or a short message;
  • the message engine sends the message to be stored to the message management module;
  • the message management module injects the message to be stored into the HBASE database
  • the message engine module stores the to-be-stored message and its attachment in the DFS storage system, and records the DFS file storage path;
  • the message engine module sends a file storage path of the message to be stored that is determined to be a long message and a message to be stored that is determined to be a long message to the message management module;
  • the message management module stores the relevant information in HBASE to determine the relevant key value.
  • the reading and use of the message can include the following steps:
  • the message engine module initiates a request to read a message to the message management module
  • the message management module queries the HBASE for related information according to the keyword value
  • the message management module returns a message query result to the message engine module.
  • the message data store update can include the following steps:
  • the message management module periodically queries each type of message storage state
  • the related message data is timed according to the result of the query.
  • the massive message persistence is realized, and the high-performance, scalable and secure storage of massive messages is realized.
  • Fig. 4 shows the data storage management flow of this embodiment.
  • step 410 a new message is received.
  • step 420 according to the message size, it is determined whether the received new message is a short message or a long message.
  • step 430 if the received new message is a long message, the received new message is stored in a file format on the DFS storage system.
  • step 440 the DFS storage system returns a file storage path to the message engine module.
  • step 450 the message engine module records DFC storage in a new message determined to be a long message. path.
  • step 460 the message engine module sends a message add message to the message management module.
  • step 470 the message management module stores the newly added message storage path and related metadata information in the HBASE database, and determines the key value of the message for subsequent query.
  • step 480 the message engine module receives the saved result returned by the message management module.
  • step 490 the third party system receives the saved result returned by the message engine module.
  • step 4100 if the received new message is a short message, the message engine module initiates a message add message to the message management module.
  • the message management module stores the new message determined to be a short message in the HBASE database for subsequent big data application analysis.
  • step 4120 the message engine module receives the saved result returned by the message management module.
  • step 4130 the third party system receives the saved result returned by the message engine module.
  • step 4140 the message engine module invokes the message interface to read the message from the third party system.
  • step 4150 the message management module reads the message from the message engine module.
  • step 4160 the message management module reads the message from HBase based on the key value.
  • step 4170 the message management module returns a message to the message engine module.
  • step 4180 the message management engine returns the message to the third party system.
  • the process of reading the message may include the above steps 4140 to 4180.
  • step 4190 the message management module configures the message data retention period.
  • step 4200 the message management module periodically checks the data storage condition.
  • step 4210 the message management module periodically ages the Hbase data.
  • step 4220 the message management module periodically ages the message file data of the DFS.
  • the message data aging process may include the above steps 4190 to 4220.
  • This embodiment provides a data storage management method, which receives a message to be stored, normalizes metadata of all messages, and stores the stored message to the database after being stored in the DFS system, so that the storage can be stored in the database.
  • the management of the messages in the DFS system also combines the advantages of DFS storage and database storage, and solves the problem of using the same storage method for all massive data.
  • the present embodiment provides a computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the electronic device includes:
  • At least one processor 50 which is exemplified by a processor 50 in FIG. 5; and a memory 51, may further include a communication interface 52 and a bus 53.
  • the processor 50, the memory 51, and the communication interface 52 can complete communication with each other through the bus 53.
  • Communication interface 52 can be used for information transmission.
  • Processor 50 can invoke logic instructions in memory 51 to perform the methods of the above-described embodiments.
  • logic instructions in the memory 51 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium.
  • the memory 51 is a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction or a module corresponding to the method in the embodiment of the present disclosure.
  • the processor 50 executes the functional application and data processing by executing software programs, instructions or modules stored in the memory 51, i.e., implements the methods in the above embodiments.
  • the memory 51 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 51 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the above embodiment may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device) Etc.) Perform all or part of the steps of the method described in the above embodiments.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the data storage management method, device and data storage system provided by the present disclosure can manage messages stored in the DFS system in a database, and the implementation cost is low, the deployment is easy, and the data reading is convenient.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据存储管理方法、装置及数据存储系统,该方法包括:接收待存储的消息,标准化待存储的消息的元数据(210);将待存储的消息存储到分布式文件系统,获取存储信息,将存储信息及标准化后的元数据存储在数据库(220);以及基于数据库中存储的存储信息及标准化后的元数据,管理分布式文件系统中存储的消息(230)。

Description

数据存储管理方法、装置及数据存储系统 技术领域
本公开涉及大数据存储领域,例如涉及一种数据存储管理方法、装置及数据存储系统。
背景技术
“大数据”通常指的是那些数量巨大、难于收集、处理和分析的数据集,亦指那些在传统基础设施中长期保存的数据。海量消息高效的存储和管理,是大数据发展的基石。只有多个业务系统输出的所有消息都得到正确存储,并且用户可以通过客户端和Web浏览器中的至少一个展示、获取、新建、保存、删除以及查询消息,也可以通过客户端和Web浏览器中的至少一个进行目录操作(新建、更名、删除以及选定)。
随着科技的发展,消息的格式越来越富媒体化(包括但不限于音频、视频以及图片等),而且消息的数据量越来越大。传统的海量消息的存储方式主要有两种,第一种存储方式中,海量消息以文件格式存储在分布式文件系统(Distributed File System,DFS)中;第二种存储方式中,海量消息将数据存储在数据库中。这两种存储方式对于海量消息的存储和管理各有利弊,海量数据存储在在DFS系统中,实施成本低,易于部署,但是磁盘输入输出(Input Output,IO)比较高,容量和读写无法水平扩展,较难支撑高并发和热备份的要求;海量数据存储在数据库系统中,数据读取很方便,但是对消息的大小存在限制,一个长消息需要拆分成一个或者多个短消息,管理难度高,且消息的附件(音频、视频或者图片等)文件在数据库系统中无法存储,对于新业务的扩展存在限制。
发明内容
本公开提供了一种数据存储管理方法、装置及数据存储系统,避免了对所有海量数据均采用相同存储方式进行存储的现象,可以在数据库中对存储在DFS系统的消息进行管理,实施成本低,易于部署,数据读取方便。
本公开提供了一种数据存储管理方法,包括:
接收待存储的消息,标准化待存储的消息的元数据;
将待存储的消息存储到分布式文件系统,获取存储信息,将存储信息及标准化后的元数据存储在数据库;以及
基于数据库中存储的存储信息及标准化后的元数据,管理分布式文件系统中存储的消息。
可选的,将待存储的消息存储到分布式文件系统,获取存储信息包括:将待存储的消息及其消息附件以文件格式存储在分布式文件系统,接收分布式文件系统返回的消息存储路径。
可选的,在将存储信息及标准化后的元数据存储在数据库之后,上述方法还包括:确定消息的关键字值。
可选的,管理分布式文件系统中存储的消息包括:基于关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
可选的,元数据包括数据大小;将所述消息存储到分布式文件系统,包括:当所述数据大小大于预设阈值时,确定消息为将长消息,则将消息存储到分布式文件系统;
所述方法还包括:当所述数据大小小于或等于预设阈值时,确定消息为短消息,则将消息存储在数据库。
本公开提供了一种数据存储管理装置,包括:
通信模块,设置为接收待存储的消息,标准化待存储的消息的元数据;
存储模块,设置为将待存储的消息存储到分布式文件系统,获取存储信息,将存储信息及标准化后的元数据存储在数据库;以及
管理模块,设置为基于数据库中存储的存储信息及标准化后的元数据,管理分布式文件系统中存储的消息。
可选的,存储模块设置为:将待存储的消息及其消息附件以文件格式存储在分布式文件系统,接收分布式文件系统返回的消息存储路径。
可选的,存储模块还设置为在将存储信息及元数据存储在数据库之后,确定消息的关键字值。
可选的,管理模块设置为基于关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
可选的,元数据包括数据大小;存储模块是设置为当所述数据大小大于预设阈值,确定消息为长消息,则将消息存储到分布式文件系统;所述存储模块还设置为当所述数据大小小于或等于预设阈值,确定消息为短消息,则将消息存储在数据库。
本公开提供了一种数据存储系统,包括:数据库、分布式文件系统以及上述任一数据存储管理装置。
本公开还提供了一种数据存储管理方法,包括:
接收待存储的消息,标准化所述消息的元数据;
当所述元数据满足预设条件时,将所述消息存储到分布式文件系统,获取存储信息,将所述存储信息及标准化后的元数据存储在数据库;以及
基于所述数据库中存储的所述存储信息及标准化后的元数据,管理所述分布式文件系统中存储的消息。
本公开还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。
本公开还提供了一种电子设备,该电子设备包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。
本实施例提供了一种数据存储管理方法,接收到待存的储消息,标准化待存储的消息的元数据,确定元数据满足预设条件时,将消息存储在DFS系统, 获取存储信息,将存储信息和元数据发送至数据库,可以在数据库中对存储在DFS系统的消息进行管理,避免了对所有海量数据均采用相同存储方式进行存储的现象,实施成本低,易于部署,数据读取方便。
附图说明
图1为第一实施例提供的数据存储管理装置的结构示意图;
图2为第二实施例提供的数据存储管理方法的流程图;
图3为第三实施例提供的数据存储系统组网示意图;
图4为第三实施例中数据存储管理方法的流程图;以及
图5为一实施例中电子设备的硬件结构示意图。
具体实施方式
通过具体实施方式结合附图的方式对本公开进行诠释说明。在不冲突的情况下,以下实施例以及实施例中的技术特征可以相互任意组合。
相关技术中,海量消息全部存储在分布式文件系统(Distributed File System,DFS)中,或者,海量消息全部存储在数据库中,所有海量数据均采用同一种存储方式进行存储管理。
第一实施例
图1为第一实施例提供的数据存储管理装置的结构示意图,该装置可以存储在电子设备中。由图1可知,在本实施例中,本提供的数据存储管理装置1包括:通信模块11、存储模块和12管理模块13。
通信模块11设置为接收待存储消息,标准化待存储消息的元数据。
可选地,电子设备可以接收多种类型的终端、富媒体通信(Rich Communication Suite,RCS)、短消息服务中心(Short Message Service Center,SMSC)、虚拟内存系统(Virtual Memory System,VMS)和第三方系统发送的待存储的消息。
电子设备接收到该待存储的消息后,对该消息以及消息的元数据进行标准 化处理。
存储模块12设置为将待存储的消息存储到分布式文件系统,获取消息的存储信息,将消息的存储信息及元数据存储在数据库。
可选地,该元数据为经过标准化后的元数据。
管理模块13设置为基于数据库中存储的存储信息及元数据,管理分布式文件系统中存储的消息。
在一些实施例中,上述实施例中的存储模块12可以设置为:将待存储消息及其消息附件以文件格式存储在分布式文件系统,接收分布式文件系统返回的消息存储路径。
可选地,该消息附件可以是指待存储的消息中TXT格式的文件。
在一些实施例中,上述实施例中的存储模块12可以设置为在将存储信息及元数据存储在数据库之后,根据标准化后的元数据,确定该消息的关键字值。
在一些实施例中,上述实施例中的管理模块13可以设置为基于关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
在一些实施例中,上述实施例中的元数据可以包括数据大小;存储模块12可以设置为根据数据大小确定待存储消息为长消息还是短消息;将数据大小与预设阈值进行比较,当数据大小大于预设阈值时,确定该消息为长消息,则将该消息存储到分布式文件系统;以及当数据大小小于或等于预设阈值时,确定该消息为短消息,则将待存储消息存储在数据库。
可选地,该预设阈值可以为操作人员根据操作经验确定的一个数据大小,也可以是系统默认的值。将该数据大小作为比较的阈值,将待存储的消息的数据大于与该阈值进行比较,从而确定该待存储消息的大小。根据该待存储消息的大小决定该待存储消息的存放位置。
本实施例提供了一种数据存储系统,其包括:数据库、分布式文件系统以及上述实施例提供的数据存储管理装置。
第二实施例
图2为第二实施例提供的数据存储管理方法的流程图,该方法可以由数据存储管理装置执行,该装置可以存储于电子设备中。由图2可知,在本实施例中,本实施例提供的数据存储管理方法包括以下步骤。
在步骤210中,接收待存储消息,标准化待存储消息的元数据。
在步骤220中,将待存储的消息存储到分布式文件系统,获取消息的存储信息,将存储信息及元数据存储在数据库。
在步骤230中,基于数据库中存储的存储信息及元数据,管理分布式文件系统中存储的消息。
在一些实施例中,上述实施例中的将待存储消息存储到分布式文件系统,获取存储信息可以包括:将待存储消息及其消息附件以文件格式存储在分布式文件系统,接收分布式文件系统返回的消息存储路径。其中,存储信息可包括消息存储路径。
在一些实施例中,在将存储信息及元数据存储在数据库之后,数据存储管理方法还可以包括:根据标准化后的元数据,确定该消息的关键字值。
在一些实施例中,上述实施例中的管理分布式文件系统中存储的消息可以包括:基于关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
在一些实施例中,上述实施例中的元数据可以包括数据大小,所述方法还可以包括:根据数据大小确定待存储的消息为长消息还是短消息;将数据大小与预设阈值进行比较,当数据大小大于预设阈值时,确定该消息为长消息,将该消息存储到分布式文件系统;以及当数据大小小于或等于预设阈值时,确定该消息为短消息,将该消息存储在数据库。
第三实施例
结合应用场景对本实施例进行诠释说明。
本实施例提供了一种将海量消息根据文件大小分开存储的方法。
图3示出了本实施例的数据存储系统的示意图,数据存储系统包括第三方消息系统,消息引擎模块301,消息管理模块302,数据库303,DFS存储系统 304等网元。其中,数据库303可以是HBASE。消息引擎模块301分别与多种类型的终端、富媒体通信(Rich Communication Suite,RCS)、短消息服务中心(Short Message Service Center,SMSC)、虚拟内存系统(Virtual Memory System,VMS)和其他第三方系统进行通信。数据库303包括元数据消息管理模块(包括网络文件系统(Network File System,NFS)客户端)、分布式服务框架(Zookeeper)、基于Hadoop的一个数据仓库工具(Hive)、基于Lucene的搜索服务器(Elasticsearch)、大数据分布式编程框架(Spark)、又一个资源协调者(Yet Another Resource Negotiator,YARN)、分布式列存储系统(Hbase)、Hadoop分布式文件系统(Hadoop Distributed File System,HDFS)、分布式的日志收集系统(Flume)。DFS存储系统304包括NFS服务器。
基于图3,本实施例采用的技术方案是,消息引擎模块对海量消息进行预处理,标准化海量消息本身的元数据信息(包括消息宿主信息,消息状态,消息类型、消息来源、消息目录、编码类型、消息标识(Identification,ID)、消息大小(size)、消息主题、消息传递方式以及消息内容等),根据预处理的结果中的内容size的属性(即文件大小),可以将消息大小超过2M的消息及消息的附件文件存储在DFS存储系统中,消息大小小于或等于2M的消息及消息的附件目录可以由消息管理模块序列化成字符串存储在列式数据库HBASE中,建立关键字值(keyvalue)的索引值,通过索引值,可以对消息进行读取,删除,文件的定期老化等日常管理,分析以及统计。
可选地,该应用场景中,预设阈值设置为2M,将消息大小与该预设阈值进行比较,当消息大小超过2M时,确定消息为长消息;当消息大小小于等于2M时,确定消息为短消息。此处的2M仅为预设阈值的一个举例,并非对该预设阈值取值的限定。
可选地,上述实施例中提及的文件大小、数据大小和消息大小均是指消息的元数据需要占用的存储空间的大小。例如,一个消息的元数据可以占用几M存储空间,或者占用几K的存储空间。
数据存储管理可以包括消息注入,消息读取和使用,以及消息数据存储更 新。消息注入可以包括以下步骤。
消息引擎模块对待存储的消息进行标准化预处理,并判断待存储消息是长消息还是短消息;
如果待存储消息是短消息,消息引擎则将待存储消息发送给消息管理模块;
消息管理模块将待存储的消息注入HBASE数据库;
如果待存储消息是长消息,则消息引擎模块将待存储消息及其附件存储在DFS存储系统,并记录DFS文件存储路径;
消息引擎模块将判断为长消息的待存储消息的文件存储路径及判断为长消息的待存储消息发送给消息管理模块;以及
消息管理模块将相关信息存储在HBASE,确定相关的关键字值。
消息的读取和使用可以包括以下步骤:
消息引擎模块向消息管理模块发起读取消息的请求;
消息管理模块根据关键字值向HBASE查询相关信息;以及
消息管理模块向消息引擎模块返回消息查询结果。
消息数据存储更新可以包括以下步骤:
在消息管理模块上设置每一类消息的存储周期;
消息管理模块定时查询每一类消息存储状态;以及
按照查询的结果定时老化相关消息数据。
采用上述的技术方案,实现了对海量消息持久化,实现了海量消息的高性能、可扩展以及安全存储。
图4示出了本实施例的数据存储管理流程。
在步骤410中,接收新增消息。
在步骤420中,根据消息大小,判断接收的新增消息是短消息还是长消息。
在步骤430中,如果接收的新增消息是长消息,则将接收的新增消息以文件格式存储在DFS存储系统上。
在步骤440中,DFS存储系统返回文件存储路径给消息引擎模块。
在步骤450中,消息引擎模块在判定为长消息的新增消息中记录DFC存储 路径。
在步骤460中,消息引擎模块给消息管理模块发送消息增加(add)消息。
在步骤470中,消息管理模块将新增消息存储路径及相关元数据信息存储在HBASE数据库中,并确定消息的关键字值,用于后续查询。
在步骤480中,消息引擎模块接收消息管理模块返回的保存结果。
在步骤490中,第三方系统接收消息引擎模块返回的保存结果。
在步骤4100中,如果接收的新增消息是短消息,消息引擎模块向消息管理模块发起消息增加(add)消息。
在步骤4110中,消息管理模块将判定为短消息的新增消息存储在HBASE数据库中,用于后续的大数据应用分析。
在步骤4120中,消息引擎模块接收消息管理模块返回的保存结果。
在步骤4130中,第三方系统接收消息引擎模块返回的保存结果。
在步骤4140中,消息引擎模块调用消息接口从第三方系统读取消息。
在步骤4150中,消息管理模块从消息引擎模块读取消息。
在步骤4160中,消息管理模块根据关键字值从HBase中读取消息。
在步骤4170中,消息管理模块向消息引擎模块返回消息。
在步骤4180中,消息管理引擎将消息返回给第三方系统。
读取消息流程可以包括上述步骤4140至步骤4180。
在步骤4190中,消息管理模块配置消息数据保存周期。
在步骤4200中,消息管理模块定时检查数据存储情况。
在步骤4210中,消息管理模块定时老化Hbase数据。
在步骤4220中,消息管理模块定时老化DFS的消息文件数据。
消息数据老化流程可以包括上述步骤4190至步骤4220。
本实施例提供了一种数据存储管理方法,接收待存储消息,对所有消息进行元数据标准化之后,将其在DFS系统存储之后,将存储消息发送至数据库,这样,就可以在数据库中对存储在DFS系统的消息进行管理,同时还兼具了DFS存储及数据库存储的优点,解决了现有对所有海量数据均采用相同存储方式的问题。
本实施例提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。
本实施例提供了一种电子设备的硬件结构示意图。参见图5,该电子设备包括:
至少一个处理器(processor)50,图5中以一个处理器50为例;以及存储器(memory)51,还可以包括通信接口(Communications Interface)52和总线53。其中,处理器50、存储器51以及通信接口52可以通过总线53完成相互间的通信。通信接口52可以用于信息传输。处理器50可以调用存储器51中的逻辑指令,以执行上述实施例的方法。
此外,上述的存储器51中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。
存储器51作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的方法对应的程序指令或模块。处理器50通过运行存储在存储器51中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述实施例中的方法。
存储器51可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器51可以包括高速随机存取存储器,还可以包括非易失性存储器。
上述实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行上述实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。
工业实用性
本公开提供的数据存储管理方法、装置及数据存储系统,可以在数据库中对存储在DFS系统的消息进行管理,实施成本低,易于部署,数据读取方便。

Claims (12)

  1. 一种数据存储管理方法,包括:
    接收待存储的消息,标准化所述消息的元数据;
    将所述消息存储到分布式文件系统,获取存储信息,将所述存储信息及标准化后的元数据存储在数据库;以及
    基于所述数据库中存储的所述存储信息及标准化后的元数据,管理所述分布式文件系统中存储的消息。
  2. 如权利要求1所述的方法,其中,所述将所述消息存储到分布式文件系统,获取存储信息包括:将所述消息及其消息附件以文件格式存储在所述分布式文件系统,接收所述分布式文件系统返回的消息存储路径。
  3. 如权利要求2所述的方法,在将所述存储信息及标准化后的元数据存储在数据库之后,所述方法还包括:根据标准化后的元数据,确定所述消息的关键字值。
  4. 如权利要求3所述的方法,其中,所述管理所述分布式文件系统中存储的消息包括:基于所述关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
  5. 如权利要求1至4任一项所述的方法,其中,所述元数据包括数据大小;
    将所述消息存储到分布式文件系统,包括:当所述数据大小大于预设阈值时,确定所述消息为长消息,将所述消息存储到所述分布式文件系统;
    所述方法还包括:
    当所述数据大小小于或等于预设阈值时,确定所述消息为短消息,将所述消息存储在所述数据库。
  6. 一种数据存储管理装置,包括:
    通信模块,设置为接收待存储的消息,标准化所述消息的元数据;
    存储模块,设置为将所述消息存储到分布式文件系统,获取存储信息,将所述存储信息及标准化后的元数据存储在数据库;以及
    管理模块,设置为基于所述数据库中存储的所述存储信息及标准化后的元数据,管理所述分布式文件系统中存储的消息。
  7. 如权利要求6所述的装置,其中,所述存储模块设置为:将所述消息及其消息附件以文件格式存储在所述分布式文件系统,接收所述分布式文件系统返回的消息存储路径。
  8. 如权利要求7所述的装置,其中,所述存储模块还设置为在将所述存储信息及标准化后的元数据存储在数据库之后,确定所述消息分配关键字值。
  9. 如权利要求8所述的装置,其中,所述管理模块设置为基于所述关键字值,进行读取对应消息和老化对应消息中的至少一种操作。
  10. 如权利要求6至9任一项所述的装置,其中,所述元数据包括数据大小;所述存储模块是设置为当所述数据大小大于预设阈值时,确定所述消息为长消息,将所述消息存储到所述分布式文件系统;所述存储模块还设置为当所述数据大小小于或等于预设阈值时,确定所述消息为短消息,则将所述消息存储在所述数据库。
  11. 一种数据存储系统,包括:数据库、分布式文件系统以及如权利要求7至10任一项所述的数据存储管理装置。
  12. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。
PCT/CN2017/079630 2016-04-06 2017-04-06 数据存储管理方法、装置及数据存储系统 WO2017174013A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610209306.7 2016-04-06
CN201610209306.7A CN107273368A (zh) 2016-04-06 2016-04-06 海量数据存储管理方法、装置及数据存储系统

Publications (1)

Publication Number Publication Date
WO2017174013A1 true WO2017174013A1 (zh) 2017-10-12

Family

ID=60000880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079630 WO2017174013A1 (zh) 2016-04-06 2017-04-06 数据存储管理方法、装置及数据存储系统

Country Status (2)

Country Link
CN (1) CN107273368A (zh)
WO (1) WO2017174013A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990394A (zh) * 2018-09-28 2020-04-10 杭州海康威视数字技术股份有限公司 分布式面向列数据库表的行数统计方法、装置和存储介质
CN113051221A (zh) * 2021-03-31 2021-06-29 网易(杭州)网络有限公司 数据存储方法、装置、介质、设备及分布式文件系统
CN114676095A (zh) * 2022-05-27 2022-06-28 恒生电子股份有限公司 基于流处理框架文件管理方法以及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710660A (zh) * 2018-05-11 2018-10-26 上海核工程研究设计院有限公司 一种数据库的物项属性参数建模和存储方法
CN112040429B (zh) * 2020-07-28 2021-09-21 南京云中云信息技术有限公司 一种基于分布式存储的短信管理系统及方法

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067541A (en) * 1997-09-17 2000-05-23 Microsoft Corporation Monitoring document changes in a file system of documents with the document change information stored in a persistent log
CN101324892A (zh) * 2007-06-12 2008-12-17 三星电子株式会社 检查内容和元数据的完整性的系统和方法
US20100241757A1 (en) * 2007-10-23 2010-09-23 Maowei Hu System and Method for Storing Streaming Media File
CN103425785A (zh) * 2013-08-22 2013-12-04 新浪网技术(中国)有限公司 数据存储系统及其用户数据存储、读取方法
CN104133882A (zh) * 2014-07-28 2014-11-05 四川大学 一种基于hdfs的小文件处理方法
CN104144150A (zh) * 2013-05-10 2014-11-12 中国电信股份有限公司 利用元数据访问信息的方法、装置和系统
CN104199899A (zh) * 2014-08-26 2014-12-10 浪潮(北京)电子信息产业有限公司 一种基于Hbase的海量图片存储方法及装置
CN104462185A (zh) * 2014-10-13 2015-03-25 南京邮电大学 一种基于混合结构的数字图书馆云存储系统
CN105100149A (zh) * 2014-05-13 2015-11-25 中国电信股份有限公司 用于管理文件的方法和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7599941B2 (en) * 2005-07-25 2009-10-06 Parascale, Inc. Transparent redirection and load-balancing in a storage network
CN102902716A (zh) * 2012-08-27 2013-01-30 苏州两江科技有限公司 基于Hadoop分布式计算平台的存储系统
CN103647850B (zh) * 2013-12-25 2017-01-25 北京京东尚科信息技术有限公司 一种分布式版本控制系统的数据处理方法、设备及系统
CN103838830B (zh) * 2014-02-18 2017-03-29 广东亿迅科技有限公司 一种HBase数据库的数据管理方法及系统
CN104516945A (zh) * 2014-11-18 2015-04-15 国家电网公司 一种基于关系数据库的hdfs元数据存储方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067541A (en) * 1997-09-17 2000-05-23 Microsoft Corporation Monitoring document changes in a file system of documents with the document change information stored in a persistent log
CN101324892A (zh) * 2007-06-12 2008-12-17 三星电子株式会社 检查内容和元数据的完整性的系统和方法
US20100241757A1 (en) * 2007-10-23 2010-09-23 Maowei Hu System and Method for Storing Streaming Media File
CN104144150A (zh) * 2013-05-10 2014-11-12 中国电信股份有限公司 利用元数据访问信息的方法、装置和系统
CN103425785A (zh) * 2013-08-22 2013-12-04 新浪网技术(中国)有限公司 数据存储系统及其用户数据存储、读取方法
CN105100149A (zh) * 2014-05-13 2015-11-25 中国电信股份有限公司 用于管理文件的方法和系统
CN104133882A (zh) * 2014-07-28 2014-11-05 四川大学 一种基于hdfs的小文件处理方法
CN104199899A (zh) * 2014-08-26 2014-12-10 浪潮(北京)电子信息产业有限公司 一种基于Hbase的海量图片存储方法及装置
CN104462185A (zh) * 2014-10-13 2015-03-25 南京邮电大学 一种基于混合结构的数字图书馆云存储系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990394A (zh) * 2018-09-28 2020-04-10 杭州海康威视数字技术股份有限公司 分布式面向列数据库表的行数统计方法、装置和存储介质
CN110990394B (zh) * 2018-09-28 2023-10-20 杭州海康威视数字技术股份有限公司 分布式面向列数据库表的行数统计方法、装置和存储介质
CN113051221A (zh) * 2021-03-31 2021-06-29 网易(杭州)网络有限公司 数据存储方法、装置、介质、设备及分布式文件系统
CN113051221B (zh) * 2021-03-31 2023-06-30 网易(杭州)网络有限公司 数据存储方法、装置、介质、设备及分布式文件系统
CN114676095A (zh) * 2022-05-27 2022-06-28 恒生电子股份有限公司 基于流处理框架文件管理方法以及系统

Also Published As

Publication number Publication date
CN107273368A (zh) 2017-10-20

Similar Documents

Publication Publication Date Title
WO2017174013A1 (zh) 数据存储管理方法、装置及数据存储系统
CN111258989B (zh) 数据库迁移评估方法、装置、存储介质和计算机设备
CN108053863B (zh) 适合大小文件的海量医疗数据存储系统及数据存储方法
US9311326B2 (en) Virtual file system for automated data replication and review
US9910895B2 (en) Push subscriptions
US9426219B1 (en) Efficient multi-part upload for a data warehouse
WO2020168692A1 (zh) 海量数据共享方法、开放共享平台及电子设备
US8805849B1 (en) Enabling use of analytic functions for distributed storage system data
CN110795499B (zh) 基于大数据的集群数据同步方法、装置、设备及存储介质
CN110413595B (zh) 一种应用于分布式数据库的数据迁移方法和相关装置
US10915500B2 (en) Method and system for historical call lookup in distributed file systems
CN105302920A (zh) 一种云存储数据的优化管理方法和系统
WO2017215646A1 (zh) 数据传输方法和装置
US20140244606A1 (en) Method, apparatus and system for storing, reading the directory index
CN107103011B (zh) 终端数据搜索的实现方法和装置
US11153071B2 (en) Citation and attribution management methods and systems
US20160042087A1 (en) Method, System And Front -End Device For Posting User Generated Content
US10262024B1 (en) Providing consistent access to data objects transcending storage limitations in a non-relational data store
CN113051460A (zh) 基于Elasticsearch的数据检索方法、系统、电子设备及存储介质
US9910968B2 (en) Automatic notifications for inadvertent file events
US9665732B2 (en) Secure Download from internet marketplace
CN112511627A (zh) 迁移元数据的方法和装置
CN113535677B (zh) 数据分析查询管理方法、装置、计算机设备及存储介质
US10853316B1 (en) File versioning for content stored in a cloud computing environment
US20180203636A1 (en) Likelihood of access based object storage in a cloud environment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17778677

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17778677

Country of ref document: EP

Kind code of ref document: A1