基于表格实现大数据量处理的方法及装置 技术领域 Method and device for realizing large data volume processing based on table
本发明涉及计算机数据处理技术领域, 具体而言, 涉及一种基于表格实现 大数据量处理的方法及装置。 背景技术 The present invention relates to the field of computer data processing technologies, and in particular, to a method and apparatus for implementing large data volume processing based on a table. Background technique
已知地, 电信网络管理系统通常需要实现对大数据量的处理, 所谓大数据 量, 即展现的数据量远远超过内存能支持的容量, 以网管系统中报表管理为例 说明,报表管理为系统管理员提供了对网管系统重要信息的统一报表输出功能。 利用报表管理功能, 系统管理员能定制报表任务、 输出报表数据, 从而方便监 控网管系统的运行。 为了更好的利用报表数据分析系统的运行情况, 常常需要 快速地统计大量性能、 告警、 配置等数据, 以便维护人员快速对系统运行情况 作出评估, 目前一般釆用报表管理系统输出相应表格的形式进行此类数据的处 理。 It is known that a telecommunication network management system usually needs to implement processing of a large amount of data. The so-called large amount of data, that is, the amount of data displayed far exceeds the capacity that can be supported by the memory, and the report management in the network management system is taken as an example to illustrate that the report management is The system administrator provides a unified report output function for important information of the network management system. With the report management function, the system administrator can customize the report task and output the report data, which is convenient for monitoring the operation of the network management system. In order to make better use of the report data analysis system, it is often necessary to quickly collect a large number of performance, alarm, configuration and other data, so that maintenance personnel can quickly evaluate the system operation. Currently, the report management system is generally used to output the corresponding form. Process such data.
但是, 现有技术提供的表格功能都比较简单, 如果要在该类表格的基础上 实现复杂的排版功能则需要进行复杂的二次开发, 但经二次开发的表格虽然能 实现复杂的排版功能, 但另一方面又难以支持大数据量的呈现。 其中, 对于所 谓的复杂排版指的是如全局实时排序、 行号显示、 列冻结、 列标题自动换行显 示、 空白列过滤等排版功能。 另外, 对于支持大数据量呈现的表格, 又难以满 足其能够实现实时排序等复杂排版功能的要求。 However, the functions provided by the prior art are relatively simple. If complex typographic functions are to be implemented on the basis of such a form, complex secondary development is required, but the secondary development of the form can realize complex typographic functions. However, on the other hand, it is difficult to support the presentation of large amounts of data. Among them, the so-called complex typesetting refers to the typesetting functions such as global real-time sorting, line number display, column freezing, column heading automatic line-feeding display, blank column filtering, and the like. In addition, for tables that support large data volume presentations, it is difficult to meet the requirements of complex typographic functions such as real-time sorting.
因此, 如何提供一种基于表格实现的既能支持复杂排版同时又能支持大数 据量呈现的方法便成了本领域技术人员亟需解决的一个技术问题。 发明内容 Therefore, how to provide a method based on table implementation that can support complex typesetting while supporting large data volume presentation has become a technical problem that those skilled in the art need to solve. Summary of the invention
为了克服现有的表格不能同时支持复杂排版功能、 全局实时排序、 大数据
量呈现的问题, 本发明实施例的目的在于提供一种基于表格实现大数据量处理 的方法及装置。 To overcome existing forms, you can't support complex typography at the same time, global real-time sorting, big data The problem of the present invention is to provide a method and apparatus for implementing large data volume processing based on a table.
为了达到本发明的目的, 本发明实施例釆用以下技术方案实现: In order to achieve the object of the present invention, the embodiments of the present invention are implemented by the following technical solutions:
一种基于表格实现大数据量处理的方法, 其包括: A method for implementing large data volume processing based on a table, comprising:
部署经二次开发的可实现复杂排版功能的表格; Deploy a second-developed form that implements complex typographic features;
建立所述表格与内存数据库之间的关联关系; Establishing an association relationship between the form and the in-memory database;
识别对所述表格的至少一个大数据量操作命令, 并依据所述大数据量操作 命令, 从所述内存数据库中获取大数据量并通过所述表格呈现。 At least one large data volume operation command to the table is identified, and a large amount of data is obtained from the in-memory database and presented through the table in accordance with the large data volume operation command.
优选地, 所述建立表格与内存数据库之间的关联关系之后, 所述方法还包 括: 依据表格的行号对内存数据库中的数据建立索引, 在需要显示数据时, 依 据表格的行号到内存数据库中读取相应的数据。 Preferably, after the establishing the association relationship between the table and the in-memory database, the method further includes: indexing the data in the in-memory database according to the row number of the table, and when the data needs to be displayed, according to the row number of the table to the memory The corresponding data is read in the database.
优选地,, 所述经二次开发的表格具备列头排序功能; 所述列头排序功能用 于将所述经二次开发的表格与内存数据库的用于对结果集的排序操作进行绑 定。 Preferably, the redeveloped table has a column header sorting function; the column header sorting function is configured to bind the redeveloped table to an in-memory database for sorting a result set .
优选地, 在依据大数据量操作命令, 从内存数据库中获取大数据量之后, 所述方法还包括: 先将所述大数据量緩存至中间文件, 然后再依据所述中间文 件在表格上呈现大数据量。 Preferably, after the large data volume is obtained from the in-memory database according to the large data volume operation command, the method further includes: first buffering the large data volume to an intermediate file, and then presenting the file according to the intermediate file. Large amount of data.
优选地, 所述方法还包括: 识别至少一个功能定制命令, 并依据所述功能 定制命令对表格支持的复杂排版功能进行相应的添加或删除操作。 Preferably, the method further comprises: identifying at least one function customization command, and performing corresponding adding or deleting operations on the complex typesetting function supported by the table according to the function customization command.
一种基于表格实现大数据量处理的装置, 其包括: An apparatus for implementing large data volume processing based on a table, comprising:
部署模块, 配置为部署经二次开发的可实现复杂排版功能的表格; 关联模块, 配置为建立表格与内存数据库之间的关联关系; a deployment module configured to deploy a secondary developed form that implements complex typographic functions; an association module configured to establish an association relationship between the form and the in-memory database;
识别模块, 配置为识别对表格的至少一个大数据量操作命令; An identification module configured to identify at least one large data volume operation command for the form;
获取模块, 配置为依据所述大数据量操作命令从内存数据库中获取大数据 量; The obtaining module is configured to obtain a large amount of data from the in-memory database according to the large data volume operation command;
呈现模块, 配置为通过所述表格将从内存数据库中获取的大数据量予以呈 现。
优选地, 所述关联模块, 配置为依据表格的行号对内存数据库中的数据建 立索引, 以便在需要显示数据时, 所述获取模块依据表格的行号到内存数据库 中读取相应的数据。 A rendering module configured to present a large amount of data retrieved from the in-memory database through the table. Preferably, the association module is configured to index data in the in-memory database according to the row number of the table, so that when the data needs to be displayed, the obtaining module reads the corresponding data into the in-memory database according to the row number of the table.
优选地, 所述经二次开发的表格具备列头排序功能; 所述列头排序功能用 于将所述经二次开发的表格与内存数据库的用于对结果集的排序操作进行绑 定。 Preferably, the redeveloped table has a column header sorting function; the column header sorting function is configured to bind the redeveloped table to an in-memory database for sorting the result set.
优选地, 所述获取模块, 配置为在依据大数据量操作命令从内存数据库中 获取大数据量之后, 将所述大数据量緩存至中间文件, 所述呈现模块依据所述 中间文件在表格上呈现大数据量。 Preferably, the obtaining module is configured to cache the large amount of data to an intermediate file after acquiring a large amount of data from the in-memory database according to a large data operation command, and the rendering module is configured on the form according to the intermediate file. Present a large amount of data.
优选地, 所述基于表格实现大数据量处理的装置还包括: Preferably, the device for implementing large data volume processing based on a table further includes:
定制模块, 配置为识别至少一个功能定制命令, 并依据所述功能定制命令 对表格支持的复杂排版功能进行相应的添加或删除操作。 The customization module is configured to identify at least one function customization command, and according to the function customization command, perform corresponding addition or deletion operations on the complex layout function supported by the table.
通过上述本发明的技术方案可以看出, 本发明提供的基于表格实现大数据 量处理的方法及装置通过对表格进行可实现复杂排版功能的二次开发, 以及将 所述经二次开发的表格与内存数据库予以绑定, 在用户需要通过表格对大数据 量进行查阅、 分析等操作时, 该表格可同时支持复杂排版、 全局实时排序、 大 数据量呈现的功能。 附图说明 It can be seen from the above technical solution of the present invention that the method and device for realizing large data volume processing based on a table provided by the present invention can realize secondary development of a complex typesetting function by using a table, and the secondary developed form It is bound to the in-memory database. When users need to view and analyze large data volumes through tables, the table can support complex layout, global real-time sorting, and large data volume presentation. DRAWINGS
图 1是本发明实施例提供的基于表格实现大数据量处理的方法流程示意图; 图 2是本发明另一实施例提供的基于表格实现大数据量处理的方法流程示 意图; 1 is a schematic flowchart of a method for implementing large data volume processing based on a table according to an embodiment of the present invention; FIG. 2 is a flow chart of a method for implementing large data volume processing based on a table according to another embodiment of the present invention;
图 3是本发明实施例提供的基于表格实现大数据量处理的装置结构示意图; 图 4是本发明另一实施例提供的基于表格实现大数据量处理的装置结构示 意图。 FIG. 3 is a schematic structural diagram of an apparatus for implementing large data volume processing based on a table according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of an apparatus for implementing large data volume processing based on a table according to another embodiment of the present invention.
本发明目的的实现、 功能特点及优异效果, 下面将结合具体实施例以及附 图做进一步的说明。
具体实施方式 The realization, functional features and excellent effects of the object of the present invention will be further described below in conjunction with the specific embodiments and the accompanying drawings. detailed description
下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述, 以使本领域的技术人员可以更好的理解本发明并能予以实施, 但所举实施例不 作为对本发明的限定。 The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings and specific embodiments to enable those skilled in the art to understand the invention. .
如图 1所示, 本发明实施例提供的一种基于表格实现大数据量处理的方法, 其包括如下步骤: As shown in FIG. 1 , a method for implementing large data volume processing based on a table according to an embodiment of the present invention includes the following steps:
S10、 部署经二次开发的可实现复杂排版功能的表格; S10, deploying a secondary developed form that can implement complex typesetting functions;
S20、 建立表格与内存数据库之间的关联关系; S20. Establish an association relationship between the table and the in-memory database.
S30、识别对表格的至少一个大数据量操作命令,并依据所述大数据量操作 命令从内存数据库中获取大数据量并通过所述表格呈现。 S30. Identify at least one large data volume operation command for the table, and obtain a large amount of data from the in-memory database according to the large data volume operation command and present through the table.
具体地, 在本发明实施例中, 所述复杂排版功能包括但不限于全局实时排 序、 行号显示、 列冻结、 列标题自动换行显示、 空白列过滤等排版功能。 Specifically, in the embodiment of the present invention, the complex typesetting function includes, but is not limited to, a global real-time sorting, a line number display, a column freeze, a column header automatic line feed display, and a blank column filter.
在所述步骤 S10中,对于所述表格的预先进行的二次开发可依照本领域技术 人员已掌握的现有技术进行, 本文对此不做详述。 In the step S10, the pre-developed secondary development of the table may be performed according to the prior art that is known to those skilled in the art, and will not be described in detail herein.
本实施例中, 所述经二次开发的表格具备列头排序功能, 所述列头排序功 能用于将所述经二次开发的表格与内存数据库的用于对结果集的排序操作进行 绑定; 其中, 所述排序操作指令可以为 Order by操作。 以此可以实现点击表头以 进行全局排序的功能。 In this embodiment, the redeveloped table has a column head sorting function, and the column head sorting function is used to bind the redeveloped table and the in-memory database for sorting the result set. The ordering operation instruction may be an Order by operation. This allows you to click on the header to perform global sorting.
本实施例中,对于所述步骤 S20, 所述建立表格与内存数据库之间的关联关 系可以为建立所述表格的显示逻辑与内存数据库之间的关联关系。 In this embodiment, for the step S20, the association relationship between the establishment table and the in-memory database may be an association relationship between the display logic of the table and the in-memory database.
建立表格与内存数据库之间的关联关系之后, 还可以包括: 依据表格的行 号对内存数据库中的数据建立索引, 在需要显示数据时, 依据表格的行号到内 存数据库中读取相应的数据。 After the association between the table and the in-memory database is established, the method may further include: indexing the data in the in-memory database according to the row number of the table, and reading the corresponding data according to the row number of the table to the in-memory database when the data needs to be displayed. .
本实施例中,对于所述步骤 S30, 所述大数据量操作命令为用户输入的针对 表格的各种复杂排版操作命令。 In this embodiment, for the step S30, the large data volume operation command is a variety of complex typesetting operation commands for the table input by the user.
在依据大数据量操作命令从内存数据库中获取大数据量之后, 先将所述大
数据量緩存至中间文件, 然后再依据所述中间文件在表格上呈现大数据量, 这 样在通过表格呈现大数据量并对大数据量进行复杂排版功能的时候, 能够降低 内存的占用, 实现大数据量呈现与操作。 After obtaining a large amount of data from the in-memory database according to a large data operation command, the large The amount of data is cached to the intermediate file, and then the large amount of data is presented on the form according to the intermediate file, so that when the large amount of data is presented through the table and the complex typesetting function is performed on the large amount of data, the memory usage can be reduced, and the large size can be realized. Data volume presentation and operation.
在本发明的另一实施例中, 参考图 2, 所述基于表格实现大数据量处理的方 法还包括: In another embodiment of the present invention, referring to FIG. 2, the method for implementing large data volume processing based on a table further includes:
S40、识别至少一个功能定制命令,并依据所述功能定制命令对表格支持的 复杂排版功能进行相应的添加或删除操作。 S40. Identify at least one function customization command, and perform corresponding adding or deleting operations on the complex typesetting function supported by the table according to the function customization command.
通过识别至少一个用户输入的功能定制命令, 例如所述功能定制命令通过 用户点击鼠标右键并选择相应的定制菜单输入,则系统可以添加或删除列冻结、 列宽、 表头顺序、 列隐藏等复杂排版功能。 在其他实施例中, 所述列冻结、 列 宽、 表头顺序等功能的排版也可以通过用户直接拖拽表格的表头进行操作, 本 文对此不#丈细述。 By identifying at least one user-entered function customization command, for example, the function customization command can add or delete column freeze, column width, header order, column hiding, etc. by the user clicking the right mouse button and selecting the corresponding custom menu input. Typesetting function. In other embodiments, the typesetting of the functions such as column freeze, column width, and header order can also be performed by the user directly dragging the header of the table, which is not described in detail herein.
本发明实施例提供的基于表格实现大数据量处理的方法通过对表格进行二 次开发, 实现列冻结; 对表头进行二次开发, 支持列标题换行及排序箭头显示; 将表格的显示逻辑与内存数据库进行绑定, 在需要显示具体的数据时再根据行 号到内存数据库中读取这些记录; 将表格列头排序的功能与内存数据库的 Order by操作进行绑定, 以实现点击表头全局排序的功能; 将内存数据库数据緩存到 文件中, 降低内存的占用, 实现大数据量呈现与操作。 由此本发明实施例提供 的该表格可同时支持复杂排版、 全局实时排序、 大数据量呈现的功能。 The method for realizing large data volume processing based on the table provided by the embodiment of the present invention realizes column freezing by secondary development of the table; secondary development of the header, supporting column headings and sorting arrow display; and displaying the logic of the table The in-memory database is bound, and when the specific data needs to be displayed, the records are read according to the line number to the in-memory database; the function of sorting the table column header is bound with the Order by operation of the in-memory database, so as to implement the click header globally. Sorting function; Cache in-memory database data into files, reduce memory usage, and realize large data volume rendering and operation. Therefore, the table provided by the embodiment of the present invention can simultaneously support functions of complex typesetting, global real-time sorting, and large data volume presentation.
如图 3所示, 本发明实施例提供的一种基于表格实现大数据量处理的装置, 其包括: As shown in FIG. 3, an apparatus for implementing large data volume processing based on a table according to an embodiment of the present invention includes:
部署模块 10, 用于部署经二次开发的可实现复杂排版功能的表格; 关联模块 20, 用于建立表格的显示逻辑与内存数据库 40之间的关联关系; 识别模块 30, 用于识别对表格的至少一个大数据量操作命令 300; The deployment module 10 is configured to deploy a re-developed table that implements complex typographic functions; the association module 20 is configured to establish an association relationship between the display logic of the table and the in-memory database 40; and the identification module 30 is configured to identify the pair of tables At least one large data volume operation command 300;
获取模块 50,用于依据所述大数据量操作命令 300从内存数据库 40中获取大 数据量; The obtaining module 50 is configured to obtain a large amount of data from the in-memory database 40 according to the large data volume operation command 300;
呈现模块 60, 用于通过所述表格将从内存数据库 40中获取的大数据量予以
呈现。 a presentation module 60, configured to use the table to obtain a large amount of data obtained from the in-memory database 40 Presented.
相应地, 在本发明实施例中, 所述复杂排版功能包括但不限于全局实时排 序、 行号显示、 列冻结、 列标题自动换行显示、 空白列过滤等排版功能。 对于 所述表格的预先进行的二次开发可依照本领域技术人员已掌握的现有技术进 行。 Correspondingly, in the embodiment of the present invention, the complex typesetting function includes, but is not limited to, a global real-time sorting, a line number display, a column freeze, a column header automatic line feed display, and a blank column filter. The pre-developed secondary development of the form can be performed in accordance with the prior art already known to those skilled in the art.
在本发明实施例中, 所述关联模块 20还用于依据表格的行号对内存数据库 40中的数据建立索引, 以便在需要显示数据时, 所述获取模块 50依据表格的行 号到内存数据库 40中读取相应的数据。 In the embodiment of the present invention, the association module 20 is further configured to index the data in the in-memory database 40 according to the row number of the table, so that when the data needs to be displayed, the obtaining module 50 goes to the in-memory database according to the row number of the table. The corresponding data is read in 40.
所述识别模块 30识别的所述大数据量操作命令 300 为用户输入的针对表格 的各种复杂排版操作命令。 The large data volume operation command 300 recognized by the identification module 30 is a user-entered various complex typesetting operation commands for the table.
在本发明实施例中, 所述经二次开发的表格的列头排序功能被配置为与内 存数据库 40的用于对结果集进行排序的 Order by操作进行绑定,以此可以实现点 击表头以进行全局排序的功能。 In the embodiment of the present invention, the column header sorting function of the redeveloped table is configured to be bound to the Order by operation of the in-memory database 40 for sorting the result set, thereby implementing the click header For global sorting.
在本发明实施例中, 所述获取模块 50在依据大数据量操作命令从内存数据 库 40中获取大数据量之后, 将所述大数据量緩存至中间文件(图中未示出), 所 述呈现模块 60依据所述中间文件在表格上呈现大数据量。 这样在通过表格呈现 大数据量并对大数据量进行复杂排版功能的时候, 能够降低内存的占用, 实现 大数据量呈现与操作。 In the embodiment of the present invention, after acquiring the large data amount from the in-memory database 40 according to the large data volume operation command, the obtaining module 50 caches the large data amount to an intermediate file (not shown), The presentation module 60 presents a large amount of data on the form in accordance with the intermediate file. In this way, when a large amount of data is presented through a table and a complex typesetting function is performed on a large amount of data, the memory usage can be reduced, and a large amount of data can be presented and operated.
如图 4所示,在本发明的另一实施例中, 所述基于表格实现大数据量处理的 装置还包括: As shown in FIG. 4, in another embodiment of the present invention, the apparatus for implementing large data volume processing based on a table further includes:
定制模块 70, 用于识别至少一个功能定制命令 700, 并依据所述功能定制命 令 700对表格支持的复杂排版功能进行相应的添加或删除操作。 The customization module 70 is configured to identify at least one function customization command 700, and according to the function customization command 700, perform corresponding addition or deletion operations on the complex typesetting function supported by the table.
所述定制模块 70通过识别至少一个用户输入的功能定制命令 700,例如所述 功能定制命令 700通过用户点击鼠标右键并选择相应的定制菜单输入,则系统可 以添加或删除列冻结、 列宽、 表头顺序、 列隐藏等复杂排版功能。 在其他实施 例中, 所述列冻结、 列宽、 表头顺序等功能的排版也可以通过用户直接拖拽表 格的表头进行操作, 本文对此不做细述。
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡 是利用本发明说明书及附图内容所作的等效结构或等效流程变换, 或直接或间 接运用在其他相关的技术领域, 均同理包括在本发明的专利保护范围内。
The customization module 70 can add or delete a column freeze, a column width, and a table by identifying at least one user-entered function customization command 700, for example, the function customization command 700 can be added or deleted by the user clicking the right mouse button and selecting a corresponding custom menu input. Complex typographic features such as head order, column hiding, etc. In other embodiments, the typesetting of the column freeze, the column width, the header order, and the like may also be performed by the user directly dragging the header of the table, which is not described in detail herein. The above description is only the preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent flow transformation made by the specification and the drawings of the present invention may be directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.