WO2015018224A1 - 一种监控系统的多维度数据存储、检索方法及装置 - Google Patents

一种监控系统的多维度数据存储、检索方法及装置 Download PDF

Info

Publication number
WO2015018224A1
WO2015018224A1 PCT/CN2014/078641 CN2014078641W WO2015018224A1 WO 2015018224 A1 WO2015018224 A1 WO 2015018224A1 CN 2014078641 W CN2014078641 W CN 2014078641W WO 2015018224 A1 WO2015018224 A1 WO 2015018224A1
Authority
WO
WIPO (PCT)
Prior art keywords
monitoring
row
keyword
retrieved
row keyword
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2014/078641
Other languages
English (en)
French (fr)
Inventor
文星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Shangke Information Technology Co Ltd
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 Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Shangke Information Technology Co Ltd
Priority to US14/910,273 priority Critical patent/US10089341B2/en
Publication of WO2015018224A1 publication Critical patent/WO2015018224A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Definitions

  • the invention relates to the technical field related to data monitoring, in particular to a multi-dimensional data storage and retrieval method and device of a monitoring system. Background technique
  • the storage and display of monitoring data has always been the key to monitoring systems.
  • the existing technical solutions usually use ordinary data storage, and generally adopt the following methods:
  • SQL database storage retrieval mainly composed of data storage module, data query module, expired data deletion module.
  • A, data storage module Background collection asynchronous batch storage to improve data storage speed.
  • a multi-dimensional data storage method for a monitoring system comprising:
  • a multi-dimensional data storage device for a monitoring system comprising:
  • An indicator obtaining module configured to acquire multiple monitoring dimensions associated with each monitoring service, and at least one pair of monitoring indicator data including an indicator name and an indicator value;
  • mapping value obtaining module configured to separately convert multiple monitoring dimensions into multiple row keyword mapping values having the same length
  • a multi-dimensional data retrieval method for a monitoring system comprising:
  • the retrieval request includes a plurality of to-be-retrieved monitoring dimensions and a to-be-retrieved time range, and converting the plurality of to-be-retrieved monitoring dimensions into a plurality of to-be-searched mapping values having the same length;
  • the row keyword includes a plurality of row keyword mapping values having the same length, and a monitoring time set at a fixed time position of the row keyword, the row keyword matching the retrieval request Specifically include: The monitoring time split from the fixed time position of the row keyword, and the split monitoring time is within the time range to be retrieved, and
  • the split row keywords include the plurality of mapped values to be retrieved
  • a multi-dimensional data retrieval device for a monitoring system comprising:
  • a search request response module configured to respond to the search request, where the search request includes a plurality of to-be-retrieved monitoring dimensions and a time range to be retrieved, and convert the plurality of to-be-retrieved monitoring dimensions into a plurality of to-be-retrieved mapping values having the same length;
  • a row keyword retrieval module configured to retrieve a row keyword that meets the retrieval request, the row keyword includes a plurality of row keyword mapping values having the same length, and a monitoring time set at a fixed time position of the row keyword,
  • the line keywords that meet the search request specifically include:
  • the monitoring time split from the fixed time position of the row keyword, and the split monitoring time is within the time range to be retrieved, and
  • the split row keywords include the plurality of mapped values to be retrieved
  • the indicator data obtaining module is configured to acquire at least one pair of monitoring indicator data including the indicator name and the indicator value stored by using the row keyword that meets the retrieval request as an index.
  • the multi-dimensional data storage and retrieval method and device of the monitoring system of the present invention converts the monitoring dimension into a fixed-length mapping value, combines the monitoring time with a plurality of row keyword mapping values as a row keyword, and the monitoring The time is set at a fixed time position in the line keyword. Since the row keyword mapping value is fixed in length and the monitoring time is fixed in the row keyword, no matter how many monitoring dimensions of the monitoring service are, the corresponding row keywords can be formed, and the retrieval is also very easy.
  • the row keyword is split to obtain the row keyword mapping value of the monitoring dimension and the monitoring time, thereby dynamically modifying the monitoring dimension.
  • FIG. 1 is a flowchart of a multi-dimensional data storage method of a monitoring system according to the present invention
  • FIG. 2 is a flowchart of a multi-dimensional data retrieval method of a monitoring system according to the present invention
  • FIG. 3 is a block diagram of an example of the present invention
  • FIG. 4 is a block diagram of a multi-dimensional data storage device of a monitoring system according to the present invention
  • FIG. 5 is a block diagram of a multi-dimensional data retrieval device of a monitoring system according to the present invention.
  • FIG. 1 is a flowchart of a multi-dimensional data storage method of a monitoring system according to the present invention, including:
  • Step S101 Acquire a plurality of monitoring dimensions associated with each monitoring service, and at least one pair of monitoring indicator data including an indicator name and an indicator value;
  • Step S102 converting multiple monitoring dimensions into multiple row key mapping values having the same length respectively;
  • Step S103 combining the monitoring time with a plurality of row keyword mapping values as a row keyword, and the monitoring time is set at a fixed time position in the row keyword;
  • Step S104 Store the monitoring indicator in the distributed database by using the row keyword as an index.
  • the monitoring dimension is used to identify the monitoring indicators.
  • the indicator data can be very detailed and summarized. For example, to monitor the CPU usage, memory usage, and hard disk usage of the computer HOST-001 on the C floor of Building B, A Street, Beijing, the monitoring dimensions include: Monitoring Dimension 1: Beijing, Monitoring Dimension 2: A Street, Monitoring Dimensions 3: B Building, Monitoring Dimensions 4: C Layer, Monitoring Dimensions 5: HOST-001. By dividing the monitoring dimension, Then, various indicator data with the same monitoring dimension can be classified and classified. Before the existing monitoring system implements monitoring, it needs to first design the table structure, that is, determine the row keywords and column keywords.
  • the existing monitoring system can only pre-determine the monitoring dimension of each monitoring service before implementing monitoring.
  • the embodiment of the present invention adopts a method for dynamically modifying the monitoring dimension.
  • the monitoring dimension of the current monitoring service is obtained through step S101, including the name and number of the monitoring dimension, and then in step S103, The monitoring dimension is combined with the monitoring time as a row keyword, and the corresponding monitoring indicator is stored as an index.
  • the monitoring dimension is converted into the row keyword mapping value having the same length in step S102, at the same time, in step S103, the monitoring time is set at a fixed time position in the row keyword, and therefore, when the retrieval is performed, A fixed time position splits the monitoring time, and can also split the row keyword mapping values of multiple monitoring dimensions according to a fixed length, thereby realizing combining multiple monitoring dimensions and monitoring time into row keywords, and combining The subsequent row keyword is used as a storage index for the indicator data.
  • the multiple monitoring dimensions and the monitoring time cannot be combined to re-split multiple monitoring dimensions and By monitoring the time, it is impossible to implement a row keyword that combines multiple monitoring dimensions and monitoring time as a storage index of the indicator data.
  • Each dimension is identified as an identifier of a string.
  • the row keyword mapping value can be converted in a plurality of manners.
  • the row keyword mapping value is a hash value of the monitoring dimension. Using a hash value reduces the length and saves storage space.
  • the row key mapping value of each monitoring dimension occupies a length of 4 bytes, that is, an occupation length of an integer (int).
  • the time position can be set anywhere in the line keyword, such as after the first line keyword mapping value, or before the last line keyword mapping value. In one of them In one embodiment, the time position is a header or a tail of the row keyword. Since the monitoring time format is fixed in the monitoring system, the data length is also fixed. Therefore, if the time position is the head or the tail of the line keyword, the header or the tail of the line keyword can be simply fixed. The length of the data is used as the monitoring time.
  • FIG. 2 is a flowchart of a multi-dimensional data retrieval method of a monitoring system according to the present invention, including:
  • Step S201 In response to the retrieval request, the retrieval request includes a plurality of to-be-retrieved monitoring dimensions and a to-be-retrieved time range, and converting the plurality of to-be-retrieved monitoring dimensions into a plurality of to-be-retrieved mapping values having the same length;
  • Step S202 retrieving a row keyword that meets the retrieval request, the row keyword includes a plurality of row keyword mapping values having the same length, and a monitoring time set at a time position where the row keyword is fixed, the matching the retrieval request
  • the line keywords specifically include:
  • the monitoring time split from the fixed time position of the row keyword, and the split monitoring time is within the time range to be retrieved, and
  • the split row keywords include the plurality of mapped values to be retrieved
  • Step S203 Acquire at least one pair of monitoring indicator data including an indicator name and an indicator value stored in an index that matches the row keyword of the retrieval request.
  • the step S202 specifically includes:
  • the monitoring time is split from a fixed time position, and the row keywords after the split monitoring time are split into a plurality of row key mapping values having the same length according to the same length;
  • FIG. 3 is a block diagram showing an example of the present invention, including:
  • the data storage interface 31 uses the multi-dimensional data storage method of the monitoring system in the embodiment of the present invention to store the monitoring data into the NoSQL storage database 32.
  • the NoSQL storage database 32 uses the hbase storage based on the Hadoop file system.
  • the data query interface 33 uses the multi-dimensional data retrieval method of the monitoring system in the embodiment of the present invention to retrieve the monitoring data stored in the NoSQL storage database 32.
  • the summary module 34 obtains the required monitoring data through the data query interface 33, and realizes the calculation of the minutes, hours, days, and weeks in different monitoring dimensions according to the monitoring dimension of the monitoring data, to obtain the average value, the maximum value, the minimum value, and the like.
  • the statistics are stored in the NoSQL storage database 32.
  • the requirements of the specific monitoring dimension are designed and provided by the monitoring system according to requirements, and the corresponding data is obtained through the scheduled task calling summary module 34. As an example, combine the row keywords as shown in Table 1:
  • Each of the row keyword mapping values is 4 bytes (ie, integer data), and the monitoring time
  • the indicator data includes the indicator name and the indicator value, and the indicator value can adopt the double byte. (occupies 8 bytes) storage, in order to solve the storage footprint.
  • the above design can effectively reduce the storage space occupied by massive data storage, and can effectively improve the query speed.
  • the monitoring dimension and monitoring indicators can be dynamically expanded to adapt to business changes.
  • existing monitoring systems store data in relational databases, so there are:
  • the storage speed is proportional to the amount of data, and the storage speed becomes slower as the amount of data increases (the time range of the saved monitoring data needs to be carefully analyzed, such as one month, one week).
  • the retrieval speed is proportional to the size of the data volume, and is related to the number of concurrent retrievals. The larger the data volume, the more people are retrieved at the same time, and the retrieval speed is slower.
  • FIG. 4 is a block diagram showing a module structure of a multi-dimensional data storage device of a monitoring system according to the present invention, including:
  • the indicator obtaining module 41 is configured to acquire multiple monitoring dimensions associated with each monitoring service, And at least one pair of monitoring indicator data including the indicator name and the indicator value;
  • the mapping value obtaining module 42 is configured to separately convert the plurality of monitoring dimensions into a plurality of row keyword mapping values having the same length;
  • the line keyword generating module 43 is configured to join the monitoring time with the plurality of row keyword mapping values as a row keyword, and the monitoring time is set in a fixed time position in the row keyword;
  • the storage module 44 is configured to store the monitoring indicator in the distributed database by using the row keyword as an index.
  • the row keyword mapping value is a hash value of the monitoring dimension.
  • the time position is the head or tail of the line keyword.
  • FIG. 5 is a block diagram showing a module structure of a multi-dimensional data retrieval device of a monitoring system according to the present invention, including:
  • the search request response module 51 is configured to respond to the search request, where the search request includes a plurality of to-be-retrieved monitoring dimensions and a time range to be retrieved, and convert the plurality of to-be-retrieved monitoring dimensions into a plurality of to-be-retrieved mapping values having the same length;
  • the row keyword retrieval module 52 is configured to retrieve a row keyword that meets the retrieval request, the row keyword includes a plurality of row keyword mapping values having the same length, and a monitoring time set at a time position where the row keyword is fixed.
  • the line keywords that meet the retrieval request specifically include:
  • the monitoring time split from the fixed time position of the row keyword, and the split monitoring time is within the time range to be retrieved, and
  • the split row keywords include the plurality of mapped values to be retrieved
  • the indicator data obtaining module 53 is configured to acquire at least one pair of monitoring indicator data including the indicator name and the indicator value stored by using the row keyword that meets the retrieval request as an index.
  • the line keyword retrieval module 52 is specifically configured to: For each row keyword, the monitoring time is split from a fixed time position, and the row keywords after the split monitoring time are split into a plurality of row key mapping values having the same length according to the same length;
  • the row keywords conform to the retrieval request.
  • the to-be-retrieved mapping value is a hash value of the monitoring dimension to be retrieved.
  • the monitoring time is set at the beginning or the end of the line keyword.

Landscapes

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

Abstract

本发明涉及数据监控相关技术领域,特别是一种监控系统的多维度数据存储、检索方法及装置,存储方法包括:获取与每个监控业务关联的多个监控维度,以及至少一对包括指标名称和指标值的监控指标数据;将多个监控维度分别转换为具有相同长度的多个行关键字映射值;将监控时间与多个行关键字映射值结合作为行关键字,且所述监控时间设置在行关键字中的固定的时间位置;以所述行关键字为索引在分布式数据库中存储监控指标。本发明实现根据不同的监控业务动态调整监控系统数据存储的监控维度,从而解决了现有技术修改监控维度只能通过修改程序代码的方式来实现的技术问题,减少了维护成本,提高了可扩展性。

Description

一种监控系统的多维度数据存储、 检索方法及装置 技术领域
本发明涉及数据监控相关技术领域, 特别是一种监控系统的多维 度数据存储、 检索方法及装置。 背景技术
监控数据的存储与展示一直是监控系统的关键, 对于需要监控的 系统进行数据采集的频率越大, 采集的数据量就越大, 随着采集的时 间增长, 会造成数据存储慢, 检索慢的问题, 如果采集的频率过小, 那么采集的数据量是降低了, 但是不利于系统的实时健康状况的有效 监控, 对于重要的 IT系统 (7*24小时不能中断的系统), 后台监控的 重要性是不言而喻的, 所以对于监控数据的存储, 检索 (用于报表展 示, 历史统计, 对比) 的可靠方案设计是要求很高的。 对于监控数据的存储、 检索, 现有的技术方案通常利用普通的数 据库存储, 大致采用以下方法:
( 1 ) SQL数据库存储检索: 主要由数据存储模块、 数据查询模块 组成、 过期数据删除模块。
A、 数据存储模块: 后台采集异步批量存储来提高数据存储速度。
B、 数据查询模块: 采用标准 sql来进行数据查询。
C、 过期数据删除模块: 为了避免数据量过大导致查询速度慢, 必 须定期删除某一时间点之前的数据, 比如一个月之前的数据。 然而, 现有技术监控的监控维度通常会受设计的表结构限制 (根据 业务设计表结构), 新增加的监控数据往往只能通过修改程序代码的方 式来实现, 增加了维护的成本,限制了可扩展性。 发明内容 基于此, 有必要针对现有监控系统数据存储的监控维度固定, 不 能根据不同的监控业务动态调整的技术问题, 提出一种监控系统的多 维度数据存储、 检索方法及装置。 一种监控系统的多维度数据存储方法, 包括:
获取与每个监控业务关联的多个监控维度, 以及至少一对包括指 标名称和指标值的监控指标数据;
将多个监控维度分别转换为具有相同长度的多个行关键字映射 值;
将监控时间与多个行关键字映射值结合作为行关键字, 且所述监 控时间设置在行关键字中的固定的时间位置;
以所述行关键字为索引在分布式数据库中存储监控指标。 一种监控系统的多维度数据存储装置, 包括:
指标获取模块, 用于获取与每个监控业务关联的多个监控维度, 以及至少一对包括指标名称和指标值的监控指标数据;
映射值获取模块, 用于将多个监控维度分别转换为具有相同长度 的多个行关键字映射值;
行关键字生成模块, 用于将监控时间与多个行关键字映射值结合 作为行关键字, 且所述监控时间设置在行关键字中的固定的时间位置; 存储模块, 用于以所述行关键字为索引在分布式数据库中存储监 控指标。 一种监控系统的多维度数据检索方法, 包括:
响应检索请求, 所述检索请求包括多个待检索监控维度以及待检 索时间范围, 将多个待检索监控维度转换为具有相同长度的多个待检 索映射值;
检索符合检索请求的行关键字, 所述行关键字包括多个具有相同 长度的行关键字映射值, 以及设置在行关键字固定的时间位置的监控 时间, 所述符合检索请求的行关键字具体包括: 从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
获取以符合检索请求的行关键字为索引存储的至少一对包括指标 名称和指标值的监控指标数据。 一种监控系统的多维度数据检索装置, 包括:
检索请求响应模块, 用于响应检索请求, 所述检索请求包括多个 待检索监控维度以及待检索时间范围, 将多个待检索监控维度转换为 具有相同长度的多个待检索映射值;
行关键字检索模块, 用于检索符合检索请求的行关键字, 所述行 关键字包括多个具有相同长度的行关键字映射值, 以及设置在行关键 字固定的时间位置的监控时间, 所述符合检索请求的行关键字具体包 括:
从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
指标数据获取模块, 用于获取以符合检索请求的行关键字为索引 存储的至少一对包括指标名称和指标值的监控指标数据。 本发明的一种监控系统的多维度数据存储、 检索方法及装置, 将 监控维度转换为固定长度的映射值, 将监控时间与多个行关键字映射 值结合作为行关键字, 且所述监控时间设置在行关键字中的固定的时 间位置。 由于行关键字映射值长度固定, 而监控时间在行关键字中的 位置也固定, 因此无论监控业务的监控维度为多少个, 均可以形成对 应的行关键字, 且在检索时也能非常容易地对行关键字进行拆分得到 监控维度的行关键字映射值以及监控时间, 从而实现动态修改监控维 度。 通过以行关键字为索引在分布式数据库中存储监控指标, 则能实 现根据不同的监控业务动态调整监控系统数据存储的监控维度, 从而 解决了现有技术修改监控维度只能通过修改程序代码的方式来实现的 技术问题, 减少了维护成本, 提高了可扩展性。 附图说明
图 1为本发明一种监控系统的多维度数据存储方法的工作流程图; 图 2为本发明一种监控系统的多维度数据检索方法的工作流程图; 图 3为本发明的一个例子的模块结构图;
图 4为本发明一种监控系统的多维度数据存储装置的模块结构图; 图 5为本发明一种监控系统的多维度数据检索装置的模块结构图。 具体实施方式
下面结合附图和具体实施例对本发明做进一步详细的说明。 如图 1 所示为本发明一种监控系统的多维度数据存储方法的工作 流程图, 包括:
步骤 S101, 获取与每个监控业务关联的多个监控维度, 以及至少 一对包括指标名称和指标值的监控指标数据;
步骤 S102, 将多个监控维度分别转换为具有相同长度的多个行关 键字映射值;
步骤 S103,将监控时间与多个行关键字映射值结合作为行关键字, 且所述监控时间设置在行关键字中的固定的时间位置;
步骤 S104, 以所述行关键字为索引在分布式数据库中存储监控指 标。 监控维度用于对监控指标进行标识, 通过监控维度, 能对指标数 据进行非常细致的划分汇总。 例如, 对北京市 A街 B楼 C层的电脑 HOST-001 的 CPU使用率、 内存使用率和硬盘使用率进行监控, 则监 控维度包括: 监控维度 1 : 北京市, 监控维度 2: A街, 监控维度 3 : B 楼, 监控维度 4: C层, 监控维度 5 : HOST-001。 通过划分监控维度, 则可以将具有相同监控维度的各种指标数据进行汇总分类。 现有的监控系统在实施监控前, 需要先对设计表结构, 即确定行 关键字和列关键字。 然而, 在监控系统中, 需要对不同的监控业务, 采用不同的监控维度, 但现有的监控系统, 只能在实施监控前, 预先 确定每个监控业务的监控维度, 在监控过程中, 则无法修改监控维度。 而本发明实施例采用的是动态修改监控维度的方式, 在实施监控 的过程中, 通过步骤 S101获取当前监控业务的监控维度, 包括监控维 度的名称及个数, 然后在步骤 S103中, 将多个监控维度与监控时间结 合作为行关键字,并以此为索引存放对应的监控指标。由于在步骤 S102 中, 将监控维度转换为具有相同长度的行关键字映射值, 同时, 在步 骤 S103中, 监控时间设置在行关键字中的固定的时间位置, 因此, 当 进行检索时能够根据固定的时间位置拆分出监控时间, 也能根据固定 的长度拆分出多个监控维度的行关键字映射值, 从而实现了将多个监 控维度和监控时间结合为行关键字, 并将结合后的行关键字作为指标 数据的存储索引。 而如果不采用固定的时间位置设置监控时间, 也不 采用固定的长度设定监控维度的行关键字映射值, 则无法在多个监控 维度和监控时间结合后重新拆分出多个监控维度和监控时间, 从而无 法实现将多个监控维度和监控时间结合的行关键字, 以作为指标数据 的存储索引。 每一个维度标识为一个字符串的标识, 行关键字映射值可以采用 多种方式转换, 在其中一个实施例中, 所述行关键字映射值为监控维 度的哈希值。 采用哈希值能减少长度, 从而节省存储空间。 当行关键 字映射值采用哈希值后, 每一个监控维度的行关键字映射值占用 4 个 字节的长度, 即整型 (int) 的占用长度。 时间位置可以设定在行关键字的任意地方, 例如设定在第一个行 关键字映射值之后, 或者在最后一个行关键字映射值之前。 在其中一 个实施例中, 所述时间位置为行关键字的首部或者尾部。 由于在监控 系统中, 监控时间的格式都是固定, 因此其数据长度也是固定的, 因 此设置在时间位置为行关键字的首部或者尾部, 则可以简单地从行关 键字的首部或者尾部截取固定长度的数据作为监控时间。 如图 2所述为本发明一种监控系统的多维度数据检索方法的工作 流程图, 包括:
步骤 S201 , 响应检索请求, 所述检索请求包括多个待检索监控维 度以及待检索时间范围, 将多个待检索监控维度转换为具有相同长度 的多个待检索映射值;
步骤 S202, 检索符合检索请求的行关键字, 所述行关键字包括多 个具有相同长度的行关键字映射值, 以及设置在行关键字固定的时间 位置的监控时间, 所述符合检索请求的行关键字具体包括:
从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
步骤 S203 , 获取以符合检索请求的行关键字为索引存储的至少一 对包括指标名称和指标值的监控指标数据。 在其中一个实施例中, 所述步骤 S202, 具体包括:
对每个行关键字从固定的时间位置中拆分出监控时间, 将拆分出 监控时间后的行关键字按照相同长度拆分出多个具有相同长度的行关 键字映射值;
如果检索拆分出的监控时间在所述待检索时间范围内, 且拆分出 的多个行关键字映射值包括所述多个待检索映射值, 则行关键字符合 检索请求。 在其中一个实施例中, 所述待检索映射值为待检索监控维度的哈 希值。 在其中一个实施例中, 所述监控时间设置在行关键字的首部或者 尾部。 如图 3所示为本发明的一个例子的模块结构图, 包括:
数据存储接口 31、 NoSQL存储数据库 32、 数据查询接口 33和数 据汇总接口 34。 其中, 数据存储接口 31采用本发明实施例一种监控系 统的多维度数据存储方法将将监控数据存储进 NoSQL存储数据库 32 中, NoSQL存储数据库 32采用基于 Hadoop文件系统的 hbase存储。 而数据查询接口 33则采用本发明实施例一种监控系统的多维度数据检 索方法对存储在 NoSQL存储数据库 32的监控数据进行检索。 汇总模 块 34通过数据查询接口 33获取所需要的监控数据, 根据监控数据的 监控维度实现不同监控维度下分钟, 小时, 天, 周的数据汇总计算, 以求得平均值,最大值,最小值等统计值存储至 NoSQL存储数据库 32。 具体监控维度的需求由监控系统根据需要设计并提供, 通过定时任务 调用汇总模块 34获得相应的数据。 作为一个例子, 如表 1所示组合行关键字:
Figure imgf000009_0001
表 1行关键字组合例子
其中每个行关键字映射值为 4个字节(即整型数据), 而监控时间
如表 2所示为对应存储的指标数据:
Figure imgf000009_0002
表 2指标数据存储例子
指标数据包括指标名称和指标值, 指标值可以采用 double的字节 (占用 8个字节)存储, 以此来解少存储占用空间。 采用上面的设计可以有效减少海量数据存储占用的存储空间, 并 且能有效地提高查询速度,监控维度、 监控指标可以动态扩展来适应业 务的变化。 同时, 现有的监控系统将数据存储在关系型数据库中, 因此, 存 在:
1、 存储速度与数据量的大小成正比, 并且会随着数据量的上升而 导致存储速度的变慢 (需要仔细分析保存的监控数据的时间范围, 比 如一个月, 一周)。
2、 检索速度与数据量的大小成正比, 与检索的并发数相关, 数据 量越大, 同时检索的人越多, 检索速度越慢。
3、存储容量有限,由于普通的关系型数据库数据存储的容量越多, 会影响查询速度, 通常会定时删除过期的数据, 只保留固定范围的数 据, 这也导致不能很好地跟踪历史数据进行统计对比。 而本发明实施例将指标数据存储进分布式数据库中, 因此能充分 利用分布式数据库进行数据扩展, 例如, 可以采用基于 Hadoop文件系 统的 hbase存储, 以此来解决海量数据的存储与检索, 可以设定数据存 储区间 (基于时间范围), 自动清理过期数据。 数据存储与查询可以充 分利用 hbase的分布式特性进行接口设计与实现,海量的数据的存储与 检索效率可以通过增加存储硬件来横向扩展, 并且不会降低存储与检 索速度。 如图 4所示为本发明一种监控系统的多维度数据存储装置的模块 结构图, 包括:
指标获取模块 41,用于获取与每个监控业务关联的多个监控维度, 以及至少一对包括指标名称和指标值的监控指标数据; 映射值获取模块 42, 用于将多个监控维度分别转换为具有相同长 度的多个行关键字映射值;
行关键字生成模块 43, 用于将监控时间与多个行关键字映射值结 合作为行关键字, 且所述监控时间设置在行关键字中的固定的时间位 置;
存储模块 44, 用于以所述行关键字为索引在分布式数据库中存储 监控指标。 在其中一个实施例中,所述行关键字映射值为监控维度的哈希值。 在其中一个实施例中,所述时间位置为行关键字的首部或者尾部。 如图 5所示为本发明一种监控系统的多维度数据检索装置的模块 结构图, 包括:
检索请求响应模块 51, 用于响应检索请求, 所述检索请求包括多 个待检索监控维度以及待检索时间范围, 将多个待检索监控维度转换 为具有相同长度的多个待检索映射值;
行关键字检索模块 52, 用于检索符合检索请求的行关键字, 所述 行关键字包括多个具有相同长度的行关键字映射值, 以及设置在行关 键字固定的时间位置的监控时间, 所述符合检索请求的行关键字具体 包括:
从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
指标数据获取模块 53, 用于获取以符合检索请求的行关键字为索 引存储的至少一对包括指标名称和指标值的监控指标数据。 在其中一个实施例中, 所述行关键字检索模块 52, 具体用于: 对每个行关键字从固定的时间位置中拆分出监控时间, 将拆分出 监控时间后的行关键字按照相同长度拆分出多个具有相同长度的行关 键字映射值;
如果检索拆分出的监控时间在所述待检索时间范围内, 且拆分出 的多个行关键字映射值包括所述多个待检索映射值, 则行关键字符合 检索请求。 在其中一个实施例中, 所述待检索映射值为待检索监控维度的哈 希值。 在其中一个实施例中, 所述监控时间设置在行关键字的首部或者 尾部。 以上所述实施例仅表达了本发明的几种实施方式, 其描述较为具 体和详细, 但并不能因此而理解为对本发明专利范围的限制。 应当指 出的是, 对于本领域的普通技术人员来说, 在不脱离本发明构思的前 提下, 还可以做出若干变形和改进, 这些都属于本发明的保护范围。 因此, 本发明专利的保护范围应以所附权利要求为准。

Claims

权 利 要 求 书
1. 一种监控系统的多维度数据存储方法, 其特征在于, 包括: 获取与每个监控业务关联的多个监控维度, 以及至少一对包括指 标名称和指标值的监控指标数据;
将多个监控维度分别转换为具有相同长度的多个行关键字映射 值;
将监控时间与多个行关键字映射值结合作为行关键字, 且所述监 控时间设置在行关键字中的固定的时间位置;
以所述行关键字为索引在分布式数据库中存储监控指标。
2. 根据权利要求 1所述的监控系统的多维度数据存储方法, 其特 征在于, 所述行关键字映射值为监控维度的哈希值。
3. 根据权利要求 1所述的监控系统的多维度数据存储方法, 其特 征在于, 所述时间位置为行关键字的首部或者尾部。
4. 一种监控系统的多维度数据存储装置, 其特征在于, 包括: 指标获取模块, 用于获取与每个监控业务关联的多个监控维度, 以及至少一对包括指标名称和指标值的监控指标数据;
映射值获取模块, 用于将多个监控维度分别转换为具有相同长度 的多个行关键字映射值;
行关键字生成模块, 用于将监控时间与多个行关键字映射值结合 作为行关键字, 且所述监控时间设置在行关键字中的固定的时间位置; 存储模块, 用于以所述行关键字为索引在分布式数据库中存储监 控指标。
5. 根据权利要求 4所述的监控系统的多维度数据存储装置, 其特 征在于, 所述行关键字映射值为监控维度的哈希值。
6. 根据权利要求 4所述的监控系统的多维度数据存储装置, 其特 征在于, 所述时间位置为行关键字的首部或者尾部。
7. 一种监控系统的多维度数据检索方法, 其特征在于, 包括: 响应检索请求, 所述检索请求包括多个待检索监控维度以及待检 索时间范围, 将多个待检索监控维度转换为具有相同长度的多个待检 索映射值;
检索符合检索请求的行关键字, 所述行关键字包括多个具有相同 长度的行关键字映射值, 以及设置在行关键字固定的时间位置的监控 时间, 所述符合检索请求的行关键字具体包括:
从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
获取以符合检索请求的行关键字为索引存储的至少一对包括指标 名称和指标值的监控指标数据。
8. 根据权利要求 7所述的监控系统的多维度数据检索方法, 其特 征在于, 所述检索符合检索请求的行关键字的步骤, 具体包括:
对每个行关键字从固定的时间位置中拆分出监控时间, 将拆分出 监控时间后的行关键字按照相同长度拆分出多个具有相同长度的行关 键字映射值;
如果检索拆分出的监控时间在所述待检索时间范围内, 且拆分出 的多个行关键字映射值包括所述多个待检索映射值, 则行关键字符合 检索请求。
9. 根据权利要求 7所述的监控系统的多维度数据检索方法, 其特 征在于, 所述待检索映射值为待检索监控维度的哈希值。
10. 根据权利要求 7 所述的监控系统的多维度数据检索方法, 其 特征在于, 所述监控时间设置在行关键字的首部或者尾部。
11. 一种监控系统的多维度数据检索装置, 其特征在于, 包括: 检索请求响应模块, 用于响应检索请求, 所述检索请求包括多个 待检索监控维度以及待检索时间范围, 将多个待检索监控维度转换为 具有相同长度的多个待检索映射值;
行关键字检索模块, 用于检索符合检索请求的行关键字, 所述行 关键字包括多个具有相同长度的行关键字映射值, 以及设置在行关键 字固定的时间位置的监控时间, 所述符合检索请求的行关键字具体包 括:
从行关键字固定的时间位置拆分出的监控时间, 且拆分出的监控 时间在所述待检索时间范围内, 且
从行关键字中拆分出的多个行关键字映射值, 且拆分出的行关键 字包括所述多个待检索映射值;
指标数据获取模块, 用于获取以符合检索请求的行关键字为索引 存储的至少一对包括指标名称和指标值的监控指标数据。
12. 根据权利要求 11所述的监控系统的多维度数据检索装置, 其 特征在于, 所述行关键字检索模块, 具体用于:
对每个行关键字从固定的时间位置中拆分出监控时间, 将拆分出 监控时间后的行关键字按照相同长度拆分出多个具有相同长度的行关 键字映射值;
如果检索拆分出的监控时间在所述待检索时间范围内, 且拆分出 的多个行关键字映射值包括所述多个待检索映射值, 则行关键字符合 检索请求。
13. 根据权利要求 11所述的监控系统的多维度数据检索装置, 其 特征在于, 所述待检索映射值为待检索监控维度的哈希值。
14. 根据权利要求 1 1所述的监控系统的多维度数据检索装置, 其 特征在于, 所述监控时间设置在行关键字的首部或者尾部。
PCT/CN2014/078641 2013-08-07 2014-05-28 一种监控系统的多维度数据存储、检索方法及装置 Ceased WO2015018224A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/910,273 US10089341B2 (en) 2013-08-07 2014-05-28 Multidimensional data storage and retrieval method for monitoring system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310340860.5A CN103412916B (zh) 2013-08-07 2013-08-07 一种监控系统的多维度数据存储、检索方法及装置
CN201310340860.5 2013-08-07

Publications (1)

Publication Number Publication Date
WO2015018224A1 true WO2015018224A1 (zh) 2015-02-12

Family

ID=49605928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078641 Ceased WO2015018224A1 (zh) 2013-08-07 2014-05-28 一种监控系统的多维度数据存储、检索方法及装置

Country Status (3)

Country Link
US (1) US10089341B2 (zh)
CN (1) CN103412916B (zh)
WO (1) WO2015018224A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704432A (zh) * 2019-09-20 2020-01-17 贝壳技术有限公司 数据索引的建立方法和装置、可读存储介质、电子设备
CN110928855A (zh) * 2019-10-25 2020-03-27 中国电力科学研究院有限公司 一种建立电网量测数据库的方法及其系统
CN111475624A (zh) * 2020-04-13 2020-07-31 杭州海康威视系统技术有限公司 一种监控数据检索方法、装置及设备
CN112395345A (zh) * 2020-12-04 2021-02-23 江苏苏宁云计算有限公司 HBase的全量数据导入方法、装置、计算机设备及存储介质
TWI877584B (zh) * 2022-08-23 2025-03-21 大陸商中國銀聯股份有限公司 一種基於雲計算的資料檢索方法、裝置及系統

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412916B (zh) * 2013-08-07 2016-08-10 北京京东尚科信息技术有限公司 一种监控系统的多维度数据存储、检索方法及装置
CN105653568A (zh) * 2014-12-04 2016-06-08 中兴通讯股份有限公司 一种分析用户行为的方法及装置
CN105743721B (zh) * 2014-12-09 2019-02-15 博雅网络游戏开发(深圳)有限公司 数据上报方法、对上报数据进行处理的方法和装置
CN106407453A (zh) * 2016-09-30 2017-02-15 郑州云海信息技术有限公司 一种性能数据管理方法及系统
CN107741955B (zh) * 2017-09-15 2020-06-23 平安科技(深圳)有限公司 业务数据监控方法、装置、终端设备及存储介质
CN107943677B (zh) * 2017-10-13 2021-09-17 东软集团股份有限公司 应用性能监控方法、装置、可读存储介质及电子设备
CN108494622A (zh) * 2018-03-13 2018-09-04 新华三云计算技术有限公司 监控规则配置方法、装置及服务器
CN109564567B (zh) * 2018-10-17 2023-07-25 北京算能科技有限公司 数据存储方法、装置、电子设备及计算机可读存储介质
CN109522193A (zh) * 2018-10-22 2019-03-26 网宿科技股份有限公司 一种运维数据的处理方法、系统及装置
CN111459980B (zh) * 2019-01-21 2025-02-21 北京京东尚科信息技术有限公司 监控数据的存储和查询方法及装置
CN110309152A (zh) * 2019-06-26 2019-10-08 广州探迹科技有限公司 一种基于HBase的数据存储方法及装置
CN110704454B (zh) * 2019-10-15 2023-03-31 重庆远见信息产业集团股份有限公司 报表数据采集系统及方法
CN112486983A (zh) * 2020-11-23 2021-03-12 广州经传多赢投资咨询有限公司 排行榜生成方法、系统、装置及存储介质
CN114238291A (zh) * 2021-11-30 2022-03-25 国网山东省电力公司日照供电公司 一种基于多维度数据的输电线路监控系统及方法
CN116414828A (zh) * 2021-12-31 2023-07-11 华为技术有限公司 一种数据管理方法及相关装置
CN117272082B (zh) * 2023-11-17 2024-03-19 深圳市联特微电脑信息技术开发有限公司 基于工业物联网的数据处理方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260546A (zh) * 1999-01-08 2000-07-19 国际商业机器公司 在手持装置中存储和检索数据的方法及装置
CN103154943A (zh) * 2010-07-27 2013-06-12 甲骨文国际公司 新数据和更新的数据的基于企业的搜索
CN103412916A (zh) * 2013-08-07 2013-11-27 北京京东尚科信息技术有限公司 一种监控系统的多维度数据存储、检索方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5218700A (en) * 1990-01-30 1993-06-08 Allen Beechick Apparatus and method for sorting a list of items
US20020029207A1 (en) * 2000-02-28 2002-03-07 Hyperroll, Inc. Data aggregation server for managing a multi-dimensional database and database management system having data aggregation server integrated therein
JP5538810B2 (ja) * 2008-10-20 2014-07-02 アマゾン テクノロジーズ インク 監視のための大量データ記憶システム
CN102523131A (zh) * 2011-12-07 2012-06-27 上海海高通信发展有限公司 用户上网行为收集方法、分析方法和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260546A (zh) * 1999-01-08 2000-07-19 国际商业机器公司 在手持装置中存储和检索数据的方法及装置
CN103154943A (zh) * 2010-07-27 2013-06-12 甲骨文国际公司 新数据和更新的数据的基于企业的搜索
CN103412916A (zh) * 2013-08-07 2013-11-27 北京京东尚科信息技术有限公司 一种监控系统的多维度数据存储、检索方法及装置

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704432A (zh) * 2019-09-20 2020-01-17 贝壳技术有限公司 数据索引的建立方法和装置、可读存储介质、电子设备
CN110928855A (zh) * 2019-10-25 2020-03-27 中国电力科学研究院有限公司 一种建立电网量测数据库的方法及其系统
CN111475624A (zh) * 2020-04-13 2020-07-31 杭州海康威视系统技术有限公司 一种监控数据检索方法、装置及设备
CN111475624B (zh) * 2020-04-13 2023-08-04 杭州海康威视系统技术有限公司 一种监控数据检索方法、装置及设备
CN112395345A (zh) * 2020-12-04 2021-02-23 江苏苏宁云计算有限公司 HBase的全量数据导入方法、装置、计算机设备及存储介质
TWI877584B (zh) * 2022-08-23 2025-03-21 大陸商中國銀聯股份有限公司 一種基於雲計算的資料檢索方法、裝置及系統

Also Published As

Publication number Publication date
US20160162523A1 (en) 2016-06-09
CN103412916B (zh) 2016-08-10
CN103412916A (zh) 2013-11-27
US10089341B2 (en) 2018-10-02

Similar Documents

Publication Publication Date Title
WO2015018224A1 (zh) 一种监控系统的多维度数据存储、检索方法及装置
CN104376053B (zh) 一种基于海量气象数据的存储与检索方法
CN103488704B (zh) 一种数据存储方法及装置
JP6088506B2 (ja) 範囲に基づく検索のためのデータ格納の管理
US10853340B2 (en) Static sorted index replication
US9645736B2 (en) Processing time series data from multiple sensors
CN104424258B (zh) 多维数据查询的方法、查询服务器、列存储服务器及系统
CN106980699B (zh) 一种数据处理平台和系统
CN103064933A (zh) 数据查询方法及系统
CN104850640A (zh) 一种基于HBase的电网设备状态监测数据存储和查询方法及系统
CN105279213A (zh) 一种日志数据库检索装置及检索方法
CN110389967B (zh) 数据存储方法、装置、服务器及存储介质
CN110825733A (zh) 一种面向多采样流的时间序列数据管理方法及系统
CN108388613B (zh) 一种缓存数据的更新方法
CN107506464A (zh) 一种基于ES实现HBase二级索引的方法
CN113961573B (zh) 一种时序数据库查询方法和查询系统
WO2018036549A1 (zh) 分布式数据库查询方法、装置及管理系统
CN102571936B (zh) 数据查找的方法、装置及系统
CN111813773B (zh) 一种电网抄表数据存储方法、上传方法、装置和存储装置
CN114661823A (zh) 数据同步的方法、装置、电子设备及可读存储介质
CN111159219B (zh) 一种数据管理方法、装置、服务器及存储介质
CN110659283A (zh) 数据标签处理方法、装置、计算机设备及存储介质
US9633035B2 (en) Storage system and methods for time continuum data retrieval
US11971856B2 (en) Efficient database query evaluation
CN102685222B (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: 14834484

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14910273

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14834484

Country of ref document: EP

Kind code of ref document: A1