WO2011035605A1 - 一种性能数据的存储方法及系统 - Google Patents

一种性能数据的存储方法及系统 Download PDF

Info

Publication number
WO2011035605A1
WO2011035605A1 PCT/CN2010/073505 CN2010073505W WO2011035605A1 WO 2011035605 A1 WO2011035605 A1 WO 2011035605A1 CN 2010073505 W CN2010073505 W CN 2010073505W WO 2011035605 A1 WO2011035605 A1 WO 2011035605A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
created
collection
data part
part table
Prior art date
Application number
PCT/CN2010/073505
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 中兴通讯股份有限公司
Priority to EP10818299.9A priority Critical patent/EP2482200A4/en
Priority to US13/497,857 priority patent/US8583606B2/en
Publication of WO2011035605A1 publication Critical patent/WO2011035605A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/2282Tablespace storage structures; Management thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Definitions

  • the present invention relates to the field of performance collection of device management systems in the field of communications, and in particular, to a method and system for storing performance data.
  • BACKGROUND In a performance collection system, it is often necessary to periodically collect multiple types of energy from a plurality of collection points of a device, and the collection points refer to physical entities on the device that can provide performance data collection and statistics.
  • These performance data will be stored in the database, and the data report with larger granularity will be generated periodically.
  • the data in the report is often displayed by the conditional query on the graphical user interface (GUI) of the report query, and The expired data of these 4 tables can also be deleted periodically.
  • GUI graphical user interface
  • the storage of performance data is a kind of sexual energy stored in a database table, and the same kind of performance data of the same generation granularity is also stored in a database table.
  • the technical problem to be solved by the present invention is to provide a storage method and system for performance data, so that when the amount of data in a database table in the prior art is huge, the operations of the database are inefficient and mutually influential.
  • the present invention discloses a method for storing performance data, including: in the process of adding a set point, the system determines the number of points that have been added and determines in advance The maximum number of collection points of the data table, the data table is created in real time; and the system stores the performance data of the collection point into the created data table, and saves the correspondence between the collection point and the data table relationship.
  • the method further includes: determining whether a data part table is created, and determining whether the number of the collection points stored in the data table created last time reaches the maximum number of points.
  • the step of creating a data part table in real time includes: if it is determined that the data part table is not created, or if the number of the collection points stored in the data table created last time reaches the maximum number of points, the new number is created.
  • the data sub-table; storing the performance data of the collection point into the created data part table comprises: storing the performance data of the added collection point into the new data part table.
  • the step of storing the performance data of the collection point in the created data part table further includes: if the system determines that the data part table has been created, and the data points stored in the data table that was created last time If the number does not reach the maximum number of collection points, the performance data of the received collection point is stored in the data table created last time.
  • the system determines a maximum number of collection points of the data part table according to the configuration parameter of the data part table, where the configuration parameter of the data part table includes the optimal storage record number, the collection period of the performance data, and the expiration of the performance data. Delete the period.
  • the method further includes: when the system receives a user-initiated increase operation or a query operation, searching for the increase operation or the query operation of the user from the saved correspondence between each set point and the data part table The data sub-table corresponding to the set point, organizes the data sub-table name according to the identifier of the found data sub-table, and writes a structured query language statement according to the organized data sub-table name to implement user-initiated increase or query operation .
  • the invention also discloses a performance data storage system, comprising a data part table creation module, a storage module and a mapping module, wherein: the data part table creation module is set as: in the process of adding a collection point in the system, according to Has A data partition table for storing performance data of the collection point is created in real time by the number of added collection points and the maximum number of collection points of the data table specified in advance; the storage module is set as: The performance data of the added set point is stored in the data part table created by the data part table creation module; the mapping module is set to: save the correspondence between each set point and the data part table storing each set point.
  • the data part table creation module is further configured to: determine whether a data part table is created, and determine whether the number of the collection points stored in the data table created in the last time reaches the maximum number of collection points;
  • the sub-table creation module is configured to create a data sub-table in real time as follows: If the data sub-table creation module determines that a data sub-table has not been created, or determines that the number of collection points stored in the data table created last time reaches the stated The maximum number of points is set, and a new data table is created; the storage module is configured to store the performance data of the added set points into the new data table.
  • the data part table creation module is further configured to: if it is determined that the data part table has been created, and the number of collection points stored in the data table created last time does not reach the maximum number of collection points, then no longer Creating a new data part table; the storage module is configured to store the performance data of the added set point to the data table that was created last time.
  • the data part table creation module is configured to determine a maximum number of aggregation points of the data part table according to the configuration parameter of the data part table, wherein the configuration parameter of the data part table includes an optimal storage record number and performance data. Set period and expiration deletion period of performance data.
  • the system further includes a processing module, and the processing module is configured to: receive a user-initiated increase operation or a query operation, and search the mapping module for a data point corresponding to the user-added operation or the query operation involved in the query operation
  • the table organizes the data sub-table name according to the identifier of the found data table, and writes a structured query language statement according to the organized data table name to implement a user-initiated increase operation or a query operation.
  • the technical solution of the present invention stores the logical data of a database table in a table, so that the operation of one database table can be distributed to multiple data tables, thereby greatly improving the processing efficiency of the database operation and improving the system. Availability.
  • the technical solution of the present invention is particularly suitable for data of a database table to be related to a certain type of entity (for example, a collection point entity), and the data related to these entities has periodic storage, periodic deletion, and frequent access performance collection system.
  • FIG. 1 is a flow chart showing the storage of performance data in the present embodiment
  • FIG. 2 is a flow chart showing the number of collection points that each data table can store in the flow shown in FIG. 1.
  • FIG. 4 is a flow chart showing the encapsulation method for performing database operations in the flow shown in FIG.
  • the main idea of the present invention is: storing data in an existing data table into a plurality of data sub-tables, specifically, the optimal number of records that can be stored according to each data table (ie, under the optimal number of records, The efficiency of each operation of this database table can be balanced), the collection period of performance data, and the deletion period of expired performance data to determine the maximum number of collection points that can be stored in each data table, and more
  • the database table is dynamically created based on the actual addition of the collection points.
  • a performance data storage system comprising a data part table creation module, a storage module, a mapping module, and a processing module; wherein, the data part table creation module is set to: according to a predetermined number of data points, the maximum number of points, real time Creating a data part table for storing performance data of the set point; wherein the data part table creation module is set to determine the data point according to the configuration parameter of the data part table
  • the maximum number of collection points of the table, the configuration parameters of the data table may include the optimal storage record number, the collection period of the performance data, and the expiration deletion period of the performance data; specifically, when receiving the collection point, the data points If the table creation module determines that the data table is not created, or determines the data table that was created last time (in this embodiment, the data table that was created last time refers to the data segment with the largest table number in the created data table.
  • the storage module is configured to: store the performance data of the received collection point into the data part table created by the data part creation module; wherein, the data part creation module always saves the performance data of the added collection point Go to the data table with the largest table number in the current system.
  • the mapping module is configured to: save a correspondence between each set point identifier and a data part table storing performance data of each set point, that is, which data part table in which the performance data of each set point is stored, specifically, The mapping module can save the corresponding information in the form of a mapping table.
  • the processing module is configured to: receive a user-initiated addition or query operation, and at this time, look up the data points corresponding to the user-organized collection points (that is, the collection points to which the user added or queryed performance data belongs) from the mapping module. Table, and according to the data classification table to identify the organization data sub-table name, according to the organization of the data table table name to write a Structured Query Language (SQL) statement, thereby achieving user-initiated increase or query operating.
  • SQL Structured Query Language
  • Step 101 The system determines the maximum number of collection points that can be stored in each data table according to the configuration parameters of the data table.
  • the configuration parameters of the data part table include the optimal storage record number, the collection period of the performance data, and the expiration deletion period of the performance data, etc., wherein the system can obtain the configuration parameter of the data part table from the configuration file, or the system Setting each configuration parameter for the data part table;
  • Step 102 Creating a mapping table, which is used to save the correspondence between the collection point and the data part table; in this step, the correspondence between the set point and the data part table refers to The correspondence between the point identifier and the data part table identifier (such as the data part table number) is used to indicate in which data part table the performance data of each set point is stored.
  • Step 103 Record the current maximum data sub-table number, which is recorded as DN, and is initially 1;
  • Step 104 Add a collection point, decide whether to create a new data sub-table and save the collection point and data points according to the existing data classification table.
  • the relationship between the tables, wherein, when creating a new data table, the current maximum data table number DN is also updated in real time;
  • Step 105 According to the correspondence between the data points and the data table, provide a suitable encapsulation method, so that the data is The operation (increasing the record or query) seems to be done in a table.
  • the system After the foregoing process implements the storage of performance data, the system also deletes the outdated performance data in each data sub-table in real time according to the expiration deletion period of the performance data.
  • similar processing may be performed according to the above process. If all the energy energy collection periods and deletion periods are the same, the above steps 101, 102, 103 It can be unified)
  • a specific sexual energy name can be used.
  • Step 101 a specific process for determining the maximum number of collection points that can be stored in each data part table, as shown in FIG. 2, includes the following steps: Step 201: The system configures the optimal storage of each data part table. Store the number of records C; In this step, when the system configures the optimal number of stored records C, it is required that under this number of records, balanced operations can be achieved for each operation of the data table, depending on the selected database product and The machine is configured to be set. For example, when using the MSSQL database, the optimal number of storage records that can be stored in the data table can be 2 million.
  • Step 202 Configure a collection period of the performance data, which is a unit of milliseconds, and is recorded as a CI.
  • Step 203 Configure an expiration deletion period of the performance data, and the unit is milliseconds, which is recorded as DI.
  • the system configuration is set. Both the period and the process deletion period are related to the actual application.
  • the collection period refers to how long the data is collected once, for example, 5 minutes.
  • the expired deletion period refers to the period during which the performance data can be saved.
  • Step 204: The system obtains the maximum number of collection points S C / ((DI / CI) * 2) that each data part table can store according to the above three configuration parameters.
  • Step 104 when adding the set point, whether to create a new data part table according to the existing data part table, save the relationship between the set point and the data part table number, and update the current maximum data part table number DN in real time.
  • the process includes the following steps: Step 301: The system detects whether the current data collection point has a corresponding data table number. If yes, the operation is ended, and the process ends. Otherwise, the process proceeds to step 302.
  • Step 302 Determining whether the current maximum data partition table number DN (that is, the data partition table created recently) stores the number of cluster points has exceeded the maximum number of cluster points S, and if so, proceeds to step 304, otherwise proceeds to step 303;
  • Step 303 Allocating the data sub-table with the largest sub-table number in the existing data sub-table to the collection point, and saving the performance data of the collection point to the allocated data sub-table (ie, currently existing) In the maximum data partition table, proceed to step 305;
  • Step 304 increment the currently existing maximum data table number DN by one, and simultaneously create the corresponding maximum data table number corresponding to The data sub-table, the data sub-table name can be composed of the sexual energy name plus the sub-table number, and the newly created data sub-table with the largest sub-table number is assigned to the current collection point, and the performance data of the collection point is set.
  • Step 305 Save the correspondence between the current point and the data table number DN to
  • step 105 according to the correspondence between the collection point and the data part table number, a suitable seal is provided.
  • the loading method makes the operation of the database (increasing the records and queries) appear to be performed in a table.
  • the specific process is as shown in FIG.
  • Step 401 The system according to the user needs to increase the performance data record Point or query the data collection point of the performance data, and find the data part table number corresponding to the collection point from the mapping table;
  • Step 402 The system organizes the data part table name according to the found data table number, wherein the data table name It can be a sexual energy name plus a sub-table number;
  • Step 403 The system writes a SQL statement according to the organized data table name, and performs a SQL query or an add operation.
  • the technical solution of the present invention distributes data stored in a data table into a plurality of data tables, and the plurality of data tables are dynamically created according to the increased demand of the collection points.
  • the operating pressure of the CURD database is evenly distributed, and the maximum number of records per database is effectively guaranteed, which improves the availability of the system.
  • a suitable encapsulation method is provided, so that from the outside, the addition, deletion and query operations on the database table are also performed in one table. For ease of use, it also provides a good package for internal logic processing.
  • the present invention greatly improves the processing efficiency of database operations and improves the usability of the system.
  • the technical solution of the present invention is particularly suitable for data related to a database table and a certain type of entity (for example, a collection point entity), and the data related to these entities has a performance collection system of periodic storage, periodic deletion, and frequent access.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

一种性能数据的存储方法及系统
技术领域 本发明涉及通信领域中设备管理系统的性能釆集领域, 特别涉及一种性 能数据的存储方法及系统。
背景技术 在性能釆集系统中, 往往需要周期性地从设备的多个釆集点上釆集多种 性能量,釆集点指的是设备上可以提供性能数据釆集和统计的物理实体,设备 上指定的获取性能数据的来源。 这些性能数据会被存入数据库, 还要能周期 性地生成粒度更大的数据报表, 报表中的数据经常要被条件查询来显示在报 表查询图形用户界面 (Graphical User Interface, GUI )上, 并且这些 4艮表的 过期数据还要能周期性地删除。 目前性能数据的存储都是一种性能量存放在一张数据库表格中, 同一种 性能量的同一种生成粒度的报表数据也是存放在一张数据库表格中。 当釆集 规模很大, 也就是釆集点数量比较多时, 会碰到大数据量性能数据的处理, 包括对这些数据的存储, 过期数据的删除, 以及这些数据的条件查询。 因为 数据量非常巨大, 当一个数据表中存储了大量的数据时, 创建、 更新、 读取、 删除(Create, Update, Read, Delete, CURD )这些基本操作都会相互影响, 从而降低处理效率, 影响系统本身的可用性。
发明内容 本发明所要解决的技术问题是, 提供一种性能数据的存储方法及系统, 从而客服现有技术中一张数据库表中数据量巨大时, 数据库各操作效率低下 以及互相影响的问题。 为了解决上述问题, 本发明公开了一种性能数据的存储方法, 包括: 系统在添加釆集点的过程中, 根据已经添加的釆集点个数以及事先确定 的数据分表的最大釆集点个数, 实时创建数据分表; 以及 系统将所述釆集点的性能数据存储到所创建的数据分表中, 并保存釆集 点与数据分表的对应关系。 实时创建数据分表的步骤之前, 所述方法还包括: 判断是否创建有数据 分表, 并判断最近一次创建的数据分表中存储的釆集点个数是否达到所述最 大釆集点个数; 实时创建数据分表的步骤包括: 若判断未创建有数据分表, 或者判断最 近一次创建的数据分表中存储的釆集点个数达到所述最大釆集点个数, 则创 建新的数据分表; 将所述釆集点的性能数据存储到所创建的数据分表中的步骤包括: 将添 加的釆集点的性能数据存储到所述新的数据分表中。 将所述釆集点的性能数据存储到所创建的数据分表中的步骤还包括: 若 所述系统判断已创建有数据分表, 并且最近一次创建的数据分表中存储的釆 集点个数未达到所述最大釆集点个数, 则将接收的釆集点的性能数据存储到 最近一次创建的数据分表中。 所述系统根据数据分表的配置参数确定数据分表的最大釆集点个数, 其 中, 所述数据分表的配置参数包括最优存储记录数、 性能数据的釆集周期以 及性能数据的过期删除周期。 所述方法还包括: 当所述系统接收到用户发起的增加操作或者查询操作 时, 从保存的各釆集点与数据分表的对应关系中查找所述用户的增加操作或 查询操作所涉及的釆集点对应的数据分表, 根据所查找到的数据分表的标识 组织数据分表名, 并根据所组织的数据分表名编写结构化查询语言语句, 以 实现用户发起的增加或者查询操作。
本发明还公开了一种性能数据的存储系统, 包括数据分表创建模块、 存 储模块以及映射模块, 其中: 所述数据分表创建模块设置为: 在本系统添加釆集点的过程中, 根据已 经添加的釆集点个数以及事先确定的数据分表的最大釆集点个数, 实时创建 用于存储所述釆集点的性能数据的数据分表; 所述存储模块设置为: 将所添加的釆集点的性能数据存储到所述数据分 表创建模块创建的数据分表中; 所述映射模块设置为: 保存各釆集点与存储各釆集点的数据分表的对应 关系。 所述数据分表创建模块还设置为: 判断是否创建有数据分表, 并判断最 近一次创建的数据分表中存储的釆集点个数是否达到所述最大釆集点个数; 所述数据分表创建模块是设置为按如下方式实时创建数据分表: 若数据 分表创建模块判断未创建有数据分表, 或者判断最近一次创建的数据分表中 存储的釆集点个数达到所述最大釆集点个数, 则创建新的数据分表; 所述存储模块是设置为将所添加的釆集点的性能数据存储到所述新的数 据分表中。 所述数据分表创建模块还设置为: 若判断已创建有数据分表, 并且最近 一次创建的数据分表中存储的釆集点个数未达到所述最大釆集点个数, 则不 再创建新的数据分表; 所述存储模块是设置为将添加的釆集点的性能数据存储到最近一次创建 的数据分表中。 所述数据分表创建模块是设置为根据数据分表的配置参数确定数据分表 的最大釆集点个数, 其中, 所述数据分表的配置参数包括最优存储记录数、 性能数据的釆集周期以及性能数据的过期删除周期。 该系统还包括处理模块, 所述处理模块设置为: 接收用户发起的增加操 作或者查询操作, 从所述映射模块中查找所述用户的增加操作或查询操作所 涉及的釆集点对应的数据分表, 并根据所查找到的数据分表的标识组织数据 分表名, 根据所组织的数据分表名编写结构化查询语言语句, 以实现用户发 起的增加操作或者查询操作。 由于本发明技术方案将一张数据库表的逻辑数据进行分表存储, 从而使 得本来对一张数据库表的操作能够分摊到多个数据表中, 大大提高了数据库 操作的处理效率, 并提升了系统的可用性。 本发明技术方案特别适合于数据 库表的数据和某类实体(例如釆集点实体)相关, 并且这些实体相关的数据 具有周期存储, 周期删除, 以及频繁访问的性能釆集系统。
附图概述 图 1是本实施例中性能数据的存储流程图; 图 2是图 1所示流程中确定每个数据表可以存储的釆集点个数的流程图; 图 3是图 1所示流程中添加釆集点时根据情况创建分表的流程图; 图 4是图 1所示流程中提供封装方法进行数据库操作的流程图。
本发明的较佳实施方式
本发明的主要构思是: 将现有一张数据表格中的数据存放到多个数据分 表中去, 具体地, 根据每张数据表可以存储的最优记录数(即在最优记录数 下, 针对这张数据库表的各个操作都可以取得平衡的效率) , 性能数据的釆 集周期, 以及过期性能数据的删除周期来决定每个数据分表中可以存放的最 大釆集点个数, 并且多个数据库分表是根据实际釆集点的添加情况动态创建 的。
下面结合附图及具体实施例对本发明技术方案作进一步的详细描述。 一种性能数据的存储系统, 包括数据分表创建模块、 存储模块、 映射模 块以及处理模块; 其中, 数据分表创建模块设置为:根据事先确定的数据分表的最大釆集点个数, 实时创建用于存储釆集点的性能数据的数据分表; 其中, 数据分表创建模块是设置为根据数据分表的配置参数确定数据分 表的最大釆集点个数, 数据分表的配置参数可以包括最优存储记录数、 性能 数据的釆集周期以及性能数据的过期删除周期; 具体地, 在接收到釆集点时, 数据分表创建模块若判断未创建有数据分 表, 或者判断最近一次创建的数据分表(在本实施例中, 最近一次创建的数 据分表指已创建的数据分表中分表号最大的数据分表)存储的釆集点个数达 到所确定的最大釆集点个数, 则创建新的数据分表, 并将新的数据分表更新 为系统中分表号最大的数据分表; 若判断已创建有数据分表, 并且最近一次 创建的数据分表(本实施例中即为已创建的数据分表中分表号最大的数据分 表)存储的釆集点个数未达到所述最大釆集点个数, 则不再创建新的数据分 表。 存储模块设置为: 将所接收的釆集点的性能数据存储到所述数据分表创 建模块创建的数据分表中; 其中, 数据分表创建模块总是将添加的釆集点的性能数据保存到当前系 统中分表号最大的数据分表中。 映射模块设置为: 保存各釆集点标识与存储各釆集点的性能数据的数据 分表的对应关系, 即表示各釆集点的性能数据保存在哪一张数据分表中, 具 体地, 映射模块可以釆用映射表的形式保存对应关。 处理模块设置为: 接收用户发起的增加或者查询操作, 此时, 从映射模 块中, 查找用户操作的所涉及釆集点 (即用户增加或查询的性能数据所属的 釆集点)对应的数据分表,并根据所查找到的数据分表标识组织数据分表名, 才艮据所组织的数据分表名编写结构化查询语言 ( Structured Query Language , SQL )语句, 从而实现用户发起的增加或者查询操作。
下面介绍上述系统的存储性能数据的具体过程, 如图 1所示, 包括以下 步骤: 步骤 101 : 系统根据数据分表的配置参数确定每个数据分表中可以存放 的最大釆集点个数; 该步骤中, 数据分表的配置参数包括最优存储记录数、 性能数据的釆集 周期以及性能数据的过期删除周期等; 其中, 系统可以从配置文件中获取数 据分表的配置参数, 或者系统为数据分表设置各配置参数; 步骤 102: 创建一张映射表, 用来保存釆集点和数据分表的对应关系; 该步骤中, 釆集点和数据分表的对应关系指, 釆集点标识和数据分表标 识(如数据分表号) 的对应关系, 用于表示各釆集点的性能数据保存在哪一 张数据分表中。 步骤 103: 记录目前最大数据分表号, 记为 DN, 初始为 1 ; 步骤 104: 添加釆集点, 根据现有数据分表情况决定是否创建新的数据 分表以及保存釆集点和数据分表的关系, 其中, 创建新的数据分表时, 还要 实时更新目前最大数据分表号 DN; 步骤 105: 根据釆集点和数据分表的对应关系, 提供合适的封装方法, 使得对数据的操作 (增加记录或查询)看上去还像是在一张表中进行。 上述流程实现性能数据的存储后, 系统还按照性能数据的过期删除周期 实时删除各数据分表中过期的性能数据。 在其他实施例中, 性能釆集系统中需要釆集多个性能量时, 可按照如上 流程做类似的处理, 如果所有性能量的釆集周期和删除周期都相同的话, 以 上步骤 101 , 102, 103可统一)根据分表号构建表名时, 可以用具体的性能 量名称。
上述步骤 101中, 确定每个数据分表中可以存放的最大釆集点个数的具 体过程, 如图 2所示, 包括以下步骤: 步骤 201 : 系统配置每个数据分表可以存放的最优存储记录数 C; 该步骤中, 系统配置最优存储记录数 C时, 要求在该记录数下, 针对这 张数据分表的各个操作都可以取得平衡的效率, 具体可以根据选用的数据库 产品以及机器配置来进行设置, 例如, 釆用 MSSQL数据库时, 数据表分表 可以存放的最优存储记录数 C可以取值 200万; 步骤 202: 配置性能数据的釆集周期, 统一单位毫秒, 记为 CI; 步骤 203: 配置性能数据的过期删除周期, 统一单位毫秒, 记为 DI; 上述步骤 202和 203中, 系统配置的釆集周期和过程删除周期都和实际 应用相关, 其中, 釆集周期指多长时间釆集一次数据, 例如 5分钟, 过期删 除周期指性能数据可以保存的期限。 步骤 204: 系统根据上述三个配置参数得出每个数据分表可以存放的最 大釆集点个数 S = C/((DI/CI)*2)。
上述步骤 104中, 添加釆集点时, 根据现有数据分表情况决定是否创建 新的数据分表, 保存釆集点和数据分表号的关系以及实时更新目前最大数据 分表号 DN的具体过程, 如图 3所示, 包括以下步骤: 步骤 301 : 系统检测当前釆集点是否已经有对应的数据分表号, 如果是, 不进行操作, 结束本流程, 否则进入步骤 302; 步骤 302: 判断目前已有的最大数据分表号 DN (即最近一次创建的数据 分表)存储的釆集点数目是否已经超过最大釆集点个数 S, 如果是, 进入步 骤 304, 否则进入步骤 303; 步骤 303: 将目前已有的数据分表中分表号最大的数据分表分配给该釆 集点, 并将该釆集点的性能数据保存到所分配的数据分表 (即目前已有的最 大数据分表) 中, 进入步骤 305; 步骤 304: 将目前已有的最大数据分表号 DN做加一递增, 同时创建出 该最大数据分表号对应的数据分表, 该数据分表名可以由性能量名称加上分 表号构成, 将新创建出的分表号最大的数据分表分配给当前釆集点, 将该釆 集点的性能数据保存到新创建的分表号最大的数据分表中; 步骤 305: 将当前釆集点和数据分表号 DN的对应关系保存到映射表中。
上述步骤 105中, 根据釆集点和数据分表号的对应关系, 提供合适的封 装方法, 使得对数据库的操作 (增加记录和查询)看上去还像是在一张表中 进行, 具体过程如图 4所示, 包括以下步骤: 步骤 401 : 系统根据用户所要增加性能数据记录的釆集点或者查询性能 数据的釆集点, 从映射表中查找该釆集点对应的数据分表号; 步骤 402: 系统根据查找到的数据分表号组织数据分表名, 其中, 数据 分表名可以是性能量名称加上分表号; 步骤 403 : 系统根据所组织的数据分表名, 编写 SQL语句, 执行 SQL 的查询或者添加操作。
从上述实施例可以看出, 本发明技术方案, 将本该存储在一个数据表中 的数据分散到多个数据表中, 而这多个数据表是根据釆集点的增加需求动态 创建出来的, CURD数据库的操作压力得到了平摊, 并且有效得保证每个数 据库的最大记录数, 提升了系统的可用性。 并且, 本发明技术方案中, 根据 釆集点和分表号的对应关系, 提供合适的封装方法, 使得从外部来看, 对数 据库表的增加, 删除以及查询操作都还象是在一张表中进行的, 使得易用性 增强, 同时也提供了对内部逻辑处理的良好封装。
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。
工业实用性 本发明大大提高了数据库操作的处理效率, 并提升了系统的可用性。 本 发明技术方案特别适合于数据库表的数据和某类实体 (例如釆集点实体 )相 关, 并且这些实体相关的数据具有周期存储、 周期删除以及频繁访问的性能 釆集系统。

Claims

权 利 要 求 书
1、 一种性能数据的存储方法, 该方法包括: 系统在添加釆集点的过程中, 根据已经添加的釆集点个数以及事先确定 的数据分表的最大釆集点个数, 实时创建数据分表; 以及 系统将所述釆集点的性能数据存储到所创建的数据分表中, 并保存釆集 点与数据分表的对应关系。
2、 如权利要求 1所述的方法, 其中: 实时创建数据分表的步骤之前, 所述方法还包括: 判断是否创建有数据 分表, 并判断最近一次创建的数据分表中存储的釆集点个数是否达到所述最 大釆集点个数; 实时创建数据分表的步骤包括: 若判断未创建有数据分表, 或者判断最 近一次创建的数据分表中存储的釆集点个数达到所述最大釆集点个数, 则创 建新的数据分表; 将所述釆集点的性能数据存储到所创建的数据分表中的步骤包括: 将添 加的釆集点的性能数据存储到所述新的数据分表中。
3、 如权利要求 2所述的方法, 其中: 将所述釆集点的性能数据存储到所创建的数据分表中的步骤还包括: 若 所述系统判断已创建有数据分表, 并且最近一次创建的数据分表中存储的釆 集点个数未达到所述最大釆集点个数, 则将接收的釆集点的性能数据存储到 最近一次创建的数据分表中。
4、 如权利要求 1至 3中任一项所述的方法, 其中: 所述系统根据数据分表的配置参数确定数据分表的最大釆集点个数, 其 中, 所述数据分表的配置参数包括最优存储记录数、 性能数据的釆集周期以 及性能数据的过期删除周期。
5、 权利要求 4所述的方法, 其中, 所述方法还包括: 当所述系统接收到用户发起的增加操作或者查询操作时, 从保存的各釆 集点与数据分表的对应关系中查找所述用户的增加操作或查询操作所涉及的 釆集点对应的数据分表, 根据所查找到的数据分表的标识组织数据分表名, 并根据所组织的数据分表名编写结构化查询语言语句, 以实现用户发起的增 加操作或者查询操作。
6、一种性能数据的存储系统, 该系统包括数据分表创建模块、存储模块 以及映射模块, 其中: 所述数据分表创建模块设置为: 在本系统添加釆集点的过程中, 根据已 经添加的釆集点个数以及事先确定的数据分表的最大釆集点个数, 实时创建 用于存储所述釆集点的性能数据的数据分表; 所述存储模块设置为: 将所添加的釆集点的性能数据存储到所述数据分 表创建模块创建的数据分表中; 所述映射模块设置为: 保存各釆集点与存储各釆集点的数据分表的对应 关系。
7、 如权利要求 6所述的系统, 其特征在于, 所述数据分表创建模块还设置为: 判断是否创建有数据分表, 并判断最 近一次创建的数据分表中存储的釆集点个数是否达到所述最大釆集点个数; 所述数据分表创建模块是设置为按如下方式实时创建数据分表: 若数据 分表创建模块判断未创建有数据分表, 或者判断最近一次创建的数据分表中 存储的釆集点个数达到所述最大釆集点个数, 则创建新的数据分表; 所述存储模块是设置为将所添加的釆集点的性能数据存储到所述新的数 据分表中。
8、 如权利要求 7所述的系统, 其中: 所述数据分表创建模块还设置为: 若判断已创建有数据分表, 并且最近 一次创建的数据分表中存储的釆集点个数未达到所述最大釆集点个数, 则不 再创建新的数据分表; 所述存储模块是设置为将添加的釆集点的性能数据存储到最近一次创建 的数据分表中。
9、 如权利要求 6至 8中任一项所述的系统, 其中: 所述数据分表创建模块是设置为根据数据分表的配置参数确定数据分表 的最大釆集点个数, 其中, 所述数据分表的配置参数包括最优存储记录数、 性能数据的釆集周期以及性能数据的过期删除周期。
10、 如权利要求 9所述的系统, 其中, 该系统还包括处理模块: 所述处理模块设置为: 接收用户发起的增加操作或者查询操作, 从所述 映射模块中查找所述用户的增加操作或者查询操作所涉及的釆集点对应的数 据分表, 并根据所查找到的数据分表的标识组织数据分表名, 根据所组织的 数据分表名编写结构化查询语言语句, 以实现用户发起的增加操作或者查询 操作。
PCT/CN2010/073505 2009-09-25 2010-06-03 一种性能数据的存储方法及系统 WO2011035605A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP10818299.9A EP2482200A4 (en) 2009-09-25 2010-06-03 METHOD FOR RECORDING PERFORMANCE DATA AND CORRESPONDING SYSTEM
US13/497,857 US8583606B2 (en) 2009-09-25 2010-06-03 Storing method of performance data and system thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009101778442A CN102033882B (zh) 2009-09-25 2009-09-25 一种性能数据的存储方法及系统
CN200910177844.2 2009-09-25

Publications (1)

Publication Number Publication Date
WO2011035605A1 true WO2011035605A1 (zh) 2011-03-31

Family

ID=43795350

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/073505 WO2011035605A1 (zh) 2009-09-25 2010-06-03 一种性能数据的存储方法及系统

Country Status (4)

Country Link
US (1) US8583606B2 (zh)
EP (1) EP2482200A4 (zh)
CN (1) CN102033882B (zh)
WO (1) WO2011035605A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867071B (zh) * 2012-10-19 2015-04-29 烽火通信科技股份有限公司 一种网管海量历史数据管理方法
CN103020196B (zh) * 2012-12-03 2016-04-13 北京奇虎科技有限公司 处理数据库操作请求的系统
CN103020193B (zh) * 2012-12-03 2016-08-03 北京奇虎科技有限公司 处理数据库操作请求的方法和设备
CN105095393B (zh) * 2015-06-30 2018-11-16 努比亚技术有限公司 一种数据存储方法及装置
US10997534B2 (en) * 2015-11-20 2021-05-04 Caterpillar Inc. System and method for connecting an operator with worksite operations
CN106202524A (zh) * 2016-07-22 2016-12-07 努比亚技术有限公司 数据库及其分表装置和方法
CN107967360A (zh) * 2017-12-22 2018-04-27 广东雅达电子股份有限公司 一种实时数据库文件存储方法
CN109165217A (zh) 2018-08-03 2019-01-08 北京涛思数据科技有限公司 一种时序数据的高效存储方法
CN109684517B (zh) * 2018-12-13 2022-01-25 广东电网有限责任公司 一种历史数据存储方法、读写方法、存储装置和设备
CN111177148B (zh) * 2019-12-06 2023-03-24 南京南瑞水利水电科技有限公司 一种水电数据库自动建表分表的方法
CN112699133A (zh) * 2021-03-23 2021-04-23 浙江太美医疗科技股份有限公司 数据库的操作方法、装置及计算机可读介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756190A (zh) * 2004-09-30 2006-04-05 北京航空航天大学 分布式性能数据采集方法
CN101183993A (zh) * 2007-12-21 2008-05-21 亿阳信通股份有限公司 一种网络管理系统和性能数据处理方法
CN101321090A (zh) * 2008-07-03 2008-12-10 中兴通讯股份有限公司 性能数据的统计方法和装置
CN101321354A (zh) * 2007-06-07 2008-12-10 中兴通讯股份有限公司 一种移动通信系统中上报性能数据的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6622177B1 (en) * 2000-07-27 2003-09-16 International Business Machines Corporation Dynamic management of addresses to an input/output (I/O) device
US7111059B1 (en) * 2000-11-10 2006-09-19 Microsoft Corporation System for gathering and aggregating operational metrics
US7890541B2 (en) * 2006-02-17 2011-02-15 International Business Machines Corporation Partition by growth table space
JP4837445B2 (ja) * 2006-06-06 2011-12-14 株式会社日立製作所 記憶システム並びに管理装置及び方法
JP4990018B2 (ja) * 2007-04-25 2012-08-01 株式会社日立製作所 装置性能管理方法、装置性能管理システム、および管理プログラム
JP4782100B2 (ja) * 2007-12-11 2011-09-28 株式会社日立製作所 ストレージシステムの性能を監視する管理計算機、その管理計算機を含む計算機システム、及び、その制御方法
US7885967B2 (en) * 2008-05-30 2011-02-08 Red Hat, Inc. Management of large dynamic tables

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756190A (zh) * 2004-09-30 2006-04-05 北京航空航天大学 分布式性能数据采集方法
CN101321354A (zh) * 2007-06-07 2008-12-10 中兴通讯股份有限公司 一种移动通信系统中上报性能数据的方法
CN101183993A (zh) * 2007-12-21 2008-05-21 亿阳信通股份有限公司 一种网络管理系统和性能数据处理方法
CN101321090A (zh) * 2008-07-03 2008-12-10 中兴通讯股份有限公司 性能数据的统计方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2482200A4 *

Also Published As

Publication number Publication date
EP2482200A1 (en) 2012-08-01
CN102033882A (zh) 2011-04-27
EP2482200A4 (en) 2016-11-16
US20130006982A1 (en) 2013-01-03
CN102033882B (zh) 2013-07-03
US8583606B2 (en) 2013-11-12

Similar Documents

Publication Publication Date Title
WO2011035605A1 (zh) 一种性能数据的存储方法及系统
US7941409B2 (en) Method and apparatus for managing data compression and integrity in a computer storage system
US11636083B2 (en) Data processing method and apparatus, storage medium and electronic device
US20030009443A1 (en) Generic data aggregation
WO2023024247A1 (zh) 一种标签数据的范围查询方法、装置、设备及存储介质
US8819074B2 (en) Replacement policy for resource container
CN104699718A (zh) 用于快速引入业务数据的方法和装置
CN104239417A (zh) 一种分布式数据库数据分片后动态调整方法及装置
CN103561133A (zh) 一种ip地址归属信息索引方法及快速查询方法
CN102779138B (zh) 实时数据的硬盘存取方法
CN108089825B (zh) 一种基于分布式集群的存储系统
WO2013091167A1 (zh) 日志存储方法及系统
WO2021179782A1 (zh) 一种提升数据库一体机执行效率的方法、设备、装置和介质
JP2022543306A (ja) ブロックチェーンデータ処理の方法、装置、機器及び可読記憶媒体
CN109063192A (zh) 一种高性能海量文件存储系统工作方法
CN102521306A (zh) 一种数据存储系统应用方法
WO2019236392A1 (en) Storing data items and identifying stored data items
CN109828966A (zh) 渐进式重哈希方法、装置、计算机设备及存储介质
CN112035413B (zh) 元数据信息查询方法、装置及存储介质
CN110825732A (zh) 数据查询方法、装置、计算机设备和可读存储介质
CN115525603A (zh) 存储统计方法、装置、计算机可读存储介质与ai设备
CN113626382B (zh) 分布式文件系统中聚合对象的索引方法、系统及相关装置
CN103353891A (zh) 数据库管理系统及其数据处理方法
CN112632027A (zh) 一种日志数据存储方法及装置
WO2011032468A1 (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: 10818299

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13497857

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2010818299

Country of ref document: EP