[go: up one dir, main page]

CN115374761A - Report generation method, report generation device, electronic equipment and storage medium - Google Patents

Report generation method, report generation device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115374761A
CN115374761A CN202210837034.0A CN202210837034A CN115374761A CN 115374761 A CN115374761 A CN 115374761A CN 202210837034 A CN202210837034 A CN 202210837034A CN 115374761 A CN115374761 A CN 115374761A
Authority
CN
China
Prior art keywords
report
processing program
configuration information
information
generation
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.)
Pending
Application number
CN202210837034.0A
Other languages
Chinese (zh)
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.)
Boc Financial Technology Co ltd
Original Assignee
Boc Financial 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 Boc Financial Technology Co ltd filed Critical Boc Financial Technology Co ltd
Priority to CN202210837034.0A priority Critical patent/CN115374761A/en
Publication of CN115374761A publication Critical patent/CN115374761A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/157Transformation using dictionaries or tables
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/16Automatic learning of transformation rules, e.g. from examples
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种报表生成方法、报表生成装置、电子设备及存储介质,该方法包括:基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;基于所述报表配置信息,生成报表加工程序;基于所述报表加工程序,生成所述报表生成需求对应的目标报表。本发明提供的报表生成方法、报表生成装置、电子设备及存储介质,可以快速响应报表生成需求,并实现相应的报表开发工作,还可以简化报表开发过程,提高报表开发效率。

Figure 202210837034

The present invention provides a method for generating a report, a device for generating a report, an electronic device, and a storage medium. The method includes: determining report configuration information based on a report generation requirement and a report configuration template, and the report configuration information is used to indicate the report generation requirement Corresponding report information sources and information acquisition rules; generating a report processing program based on the report configuration information; and generating a target report corresponding to the report generation requirement based on the report processing program. The report generation method, report generation device, electronic equipment, and storage medium provided by the present invention can quickly respond to report generation requirements, realize corresponding report development work, simplify the report development process, and improve report development efficiency.

Figure 202210837034

Description

报表生成方法、报表生成装置、电子设备及存储介质Report generating method, report generating device, electronic device and storage medium

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种报表生成方法、报表生成装置、电子设备及存储介质。The invention relates to the technical field of computers, in particular to a method for generating a report, a device for generating a report, electronic equipment and a storage medium.

背景技术Background technique

报表加工方式多样,在实际生产中各类报表繁多且不时会需要新的报表。There are various forms of report processing. In actual production, there are many types of reports and new reports are required from time to time.

现有技术一般通过使用人员提出报表需求,由产品开发作出报表映射并生成报表样例反馈使用人员,使用人员确定样例无误之后开始正式报表的开发并部署,期间需要反复沟通,成本高且响应速度慢。In the existing technology, the user puts forward the report requirements, and the product development makes the report mapping and generates report samples to feed back to the users. After the users confirm that the samples are correct, they start the development and deployment of formal reports. During this period, repeated communication is required, which is costly and responsive. slow.

发明内容Contents of the invention

本发明提供一种报表生成方法、报表生成装置、电子设备及存储介质,用以解决现有技术中报表开发时间长响应慢的技术问题。The invention provides a report generating method, a report generating device, electronic equipment and a storage medium, which are used to solve the technical problem of long report development time and slow response in the prior art.

本发明提供一种报表生成方法,包括:The present invention provides a report generation method, including:

基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate a report information source and an information acquisition rule corresponding to the report generation requirement;

基于所述报表配置信息,生成报表加工程序;Generate a report processing program based on the report configuration information;

基于所述报表加工程序,生成所述报表生成需求对应的目标报表。Based on the report processing program, a target report corresponding to the report generation requirement is generated.

在一些实施例中,所述基于报表生成需求和报表配置模板,确定报表配置信息之前,还包括:In some embodiments, before determining the report configuration information based on the report generation requirements and the report configuration template, it further includes:

基于报表属性要素、表间关系要素和报表维度要素,构建所述报表配置模板。The report configuration template is constructed based on report attribute elements, inter-table relationship elements and report dimension elements.

在一些实施例中,所述报表属性要素包括以下至少一项:数据项、数据类型、来源表、来源字段、计算规则和计算组别;In some embodiments, the report attribute elements include at least one of the following: data item, data type, source table, source field, calculation rule and calculation group;

所述表间关系要素包括以下至少一项:表名、字段名、关系符号和预设参数;The relationship elements between tables include at least one of the following: table name, field name, relationship symbol and preset parameters;

所述报表维度要素包括以下至少一项:属性名、维度依赖表和维度依赖字段。The report dimension element includes at least one of the following: attribute name, dimension dependent table and dimension dependent field.

在一些实施例中,所述基于所述报表配置信息,生成报表加工程序,包括:In some embodiments, the generating a report processing program based on the report configuration information includes:

将所述报表配置信息导入至目标数据库对应的配置表中,生成所述报表加工程序,并将编译后的报表加工程序存储于所述目标数据库。Importing the report configuration information into the configuration table corresponding to the target database, generating the report processing program, and storing the compiled report processing program in the target database.

在一些实施例中,所述基于所述报表加工程序,生成所述报表生成需求对应的目标报表之后,还包括:In some embodiments, after generating the target report corresponding to the report generation requirement based on the report processing program, it further includes:

基于所述目标报表,更新数据字典,所述数据字典用于存储所有报表对应的源数据表和所述源数据表对应的字段信息。Based on the target report, a data dictionary is updated, and the data dictionary is used to store source data tables corresponding to all reports and field information corresponding to the source data tables.

在一些实施例中,所述基于所述报表配置信息,生成报表加工程序之后,还包括:In some embodiments, after generating the report processing program based on the report configuration information, it further includes:

在目标数据库中创建所述报表加工程序对应的调度程序,所述调度程序用于调用所述报表加工程序,并输出所述目标报表。A scheduling program corresponding to the report processing program is created in the target database, and the scheduling program is used to call the report processing program and output the target report.

本发明还提供一种报表生成装置,包括:The present invention also provides a report generation device, including:

确定模块,用于基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;A determining module, configured to determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate the source of report information and information acquisition rules corresponding to the report generation requirement;

第一生成模块,用于基于所述报表配置信息,生成报表加工程序;A first generating module, configured to generate a report processing program based on the report configuration information;

第二生成模块,用于基于所述报表加工程序,生成所述报表生成需求对应的目标报表。The second generation module is configured to generate a target report corresponding to the report generation requirement based on the report processing program.

本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述报表生成方法。The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, it implements any of the report generation methods described above. .

本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述报表生成方法。The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any one of the report generation methods described above can be realized.

本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一种所述报表生成方法。The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, any one of the report generation methods described above is realized.

本发明提供的报表生成方法、报表生成装置、电子设备及存储介质,通过报表配置模板生成报表加工程序,进而可以根据报表加工程序直接生成目标报表,简化了报表开发过程,还可以快速响应用户的报表生成需求,得到满足需求的目标报表。The report generation method, report generation device, electronic equipment and storage medium provided by the present invention can generate a report processing program through a report configuration template, and then can directly generate a target report according to the report processing program, which simplifies the report development process and can also quickly respond to user requests Report generation requirements, and obtain target reports that meet the requirements.

附图说明Description of drawings

为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the present invention or the technical solutions in the prior art, the accompanying drawings that need to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are the present invention. For some embodiments of the invention, those skilled in the art can also obtain other drawings based on these drawings without creative effort.

图1是本发明提供的报表生成方法的流程示意图;Fig. 1 is a schematic flow chart of the report generating method provided by the present invention;

图2是本发明提供的报表生成装置的结构示意图;Fig. 2 is a schematic structural diagram of a report generation device provided by the present invention;

图3是本发明提供的电子设备的实体结构示意图。Fig. 3 is a schematic diagram of the physical structure of the electronic device provided by the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention , but not all examples. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

图1为本发明提供的报表生成方法的流程示意图。参照图1,本发明提供的报表生成方法可以包括:步骤110、步骤120和步骤130。FIG. 1 is a schematic flow chart of the report generation method provided by the present invention. Referring to FIG. 1 , the report generation method provided by the present invention may include: step 110 , step 120 and step 130 .

步骤110、基于报表生成需求和报表配置模板,确定报表配置信息,报表配置信息用于指示报表生成需求对应的报表信息来源和信息获取规则;Step 110: Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate the source of report information and information acquisition rules corresponding to the report generation requirement;

步骤120、基于报表配置信息,生成报表加工程序;Step 120, generate a report processing program based on the report configuration information;

步骤130、基于报表加工程序,生成报表生成需求对应的目标报表。Step 130, based on the report processing program, generate a target report corresponding to the report generation requirement.

需要说明的是,本发明提供的报表生成方法的执行主体可以是电子设备、电子设备中的部件、集成电路、或芯片。该电子设备可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本发明不作具体限定。It should be noted that the execution subject of the report generation method provided by the present invention may be an electronic device, a component in the electronic device, an integrated circuit, or a chip. The electronic device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., the present invention Not specifically limited.

下面以计算机执行本发明提供的报表生成方法为例,详细说明本发明的技术方案。The technical scheme of the present invention will be described in detail below by taking the computer executing the report generation method provided by the present invention as an example.

在实际执行中,本发明实施例可以应用为基于关系型数据库系统开发的报表工具。关系型数据库例如可以包括:Oracle数据库、SQLServer数据库、DB2数据库或Mysql数据库等。In actual implementation, the embodiment of the present invention can be applied as a reporting tool developed based on a relational database system. Relational databases may include, for example, Oracle databases, SQLServer databases, DB2 databases, or Mysql databases.

其中,数据库是指存储数据的仓库,其本质是一个文件系统,按照特定的格式将数据存储起来,用户可以对数据库中的数据进行增加、修改、删除及查询等操作,数据库中以源数据表为组织单位存储数据。Among them, the database refers to the warehouse for storing data. Its essence is a file system, which stores data in a specific format. Users can add, modify, delete and query the data in the database. The source data table in the database Store data for organizational units.

在本发明实施例中,报表生成需求可以是用户提出的报表开发需求。In this embodiment of the present invention, the report generation requirement may be a report development requirement raised by a user.

报表配置模板可以是预先构建的报表配置模块,也可以是基于报表生成需求设计的新报表配置模板。此外,可以根据报表生成需求对报表配置模板进行修改。A report configuration template can be a pre-built report configuration module, or a new report configuration template designed based on report generation requirements. In addition, the report configuration template can be modified according to report generation requirements.

报表配置模板可以描述报表信息来源以及信息获取规则。报表信息来源指的是各报表信息的数据源。合理的报表配置模板能够精确描述以上报表相关信息,并且具有可扩展性。The report configuration template can describe report information sources and information acquisition rules. The report information source refers to the data source of each report information. A reasonable report configuration template can accurately describe the relevant information of the above reports and is scalable.

在步骤110中,基于报表生成需求和报表配置模板,在数据字典中确定报表配置信息。In step 110, the report configuration information is determined in the data dictionary based on the report generation requirement and the report configuration template.

数据字典中维护有使用到的所有源数据表和字段信息,且会根据新生成的报表信息更新。All source data tables and field information used are maintained in the data dictionary, and will be updated according to newly generated report information.

数据字典具体可以包括如下信息:数据表名、表属性、表字段名称、数据类型和关键字段等信息。数据字典的格式可以为excel表格。Specifically, the data dictionary may include the following information: data table name, table attribute, table field name, data type, key field and other information. The format of the data dictionary can be an excel table.

可以理解的是,数据字典中可以包含报表配置模板中涉及到的所有要素信息,则可以在数据字典中筛选出与报表生成需求对应的报表配置信息。It can be understood that the data dictionary can contain all element information involved in the report configuration template, and then the report configuration information corresponding to the report generation requirements can be filtered out in the data dictionary.

在步骤120中,将报表配置信息导入至数据库中,自动生成报表加工程序。报表加工程序即为报表源码信息。In step 120, the report configuration information is imported into the database, and a report processing program is automatically generated. The report processing program is the source code information of the report.

在本发明实施例中,步骤130为生成目标报表的主要进程。在本步骤中,编译报表加工程序之后,可以自动生成报表生成需求对应的目标报表,并可以自动输出该目标报表。In the embodiment of the present invention, step 130 is the main process of generating the target report. In this step, after the report processing program is compiled, a target report corresponding to the report generation requirement can be automatically generated, and the target report can be automatically output.

可以理解的是,在生成目标报表之后,可以对目标报表进行可视化处理,并通过显示终端展示出来。It can be understood that after the target report is generated, the target report can be visualized and displayed through the display terminal.

目标报表可以用表格形式或图形来进行展示,目标报表的展示形式可以根据实际需求设置,例如可以包括:网格报表、交叉报表、柱状图、折线图、饼图或散点图等,本发明实施例对此不作具体限定。The target report can be displayed in the form of a table or a graph, and the display form of the target report can be set according to actual needs, for example, it can include: a grid report, a cross report, a histogram, a line chart, a pie chart or a scatter chart, etc., the present invention The embodiment does not specifically limit this.

本发明提供的报表生成方法,通过报表配置模板生成报表加工程序,进而可以根据报表加工程序直接生成目标报表,简化了报表开发过程,还可以快速响应用户的报表生成需求,得到满足需求的目标报表。The report generation method provided by the present invention generates a report processing program through a report configuration template, and then can directly generate a target report according to the report processing program, which simplifies the report development process, and can also quickly respond to the user's report generation needs, and obtain a target report that meets the requirements .

在一些实施例中,基于报表生成需求和报表配置模板,确定报表配置信息之前,还包括:In some embodiments, before determining the report configuration information based on the report generation requirements and the report configuration template, it further includes:

基于报表属性要素、表间关系要素和报表维度要素,构建报表配置模板。Build a report configuration template based on report attribute elements, inter-table relationship elements, and report dimension elements.

在实际执行中,报表配置模板包括但不限于上述三种类型的要素。报表配置模板的格式可以为excel表格。In actual execution, the report configuration template includes but not limited to the above three types of elements. The format of the report configuration template can be an excel form.

本发明提供的报表生成方法,通过定义报表信息来源和信息获取规则来构建报表配置模板,便于生成新的各个维度的报表。The report generation method provided by the present invention constructs a report configuration template by defining report information sources and information acquisition rules, so as to facilitate the generation of new reports of various dimensions.

在一些实施例中,报表属性要素可以用以下至少一项信息描述:数据项、数据类型、来源表、来源字段、计算规则和计算组别。In some embodiments, the report attribute element can be described by at least one of the following information: data item, data type, source table, source field, calculation rule and calculation group.

数据元素可由若干个数据项组成,数据项是数据的不可分割的最小单位。数据项的名称有编号、别名、简述、数据项的长度、类型、数据项的取值范围。数据项是数据记录中最基本的、不可分的有名数据单位,是具有独立含义的最小标识单位。A data element can be composed of several data items, and a data item is the smallest indivisible unit of data. The name of the data item includes number, alias, brief description, length, type, and value range of the data item. A data item is the most basic and indivisible well-known data unit in a data record, and it is the smallest identification unit with independent meaning.

数据类型可以是数字或者字符,也可以是字符串。The data type can be a number or a character, or a string.

来源表用于表示生成目标报表的源数据表。The source table is used to represent the source data table that generates the target report.

来源字段用于表示来源表的字段信息。The source field is used to represent the field information of the source table.

计算规则可以用进行数据计算的函数表示,例如可以是四则运算函数。Calculation rules can be expressed by functions for performing data calculations, for example, four arithmetic functions.

计算组别为进行计算的数据组。其中,数据组可以是根据预设规则划分,以便能对每个数据组进行聚集计算。The calculation group is the data group for calculation. Wherein, the data groups can be divided according to preset rules, so that aggregation calculation can be performed on each data group.

如表1所示,表1为报表属性示例表。下表的报表配置模板中包含报表属性要素及其对应的报表配置信息。目标报表指的是需要生成的报表。As shown in Table 1, Table 1 is an example table of report properties. The report configuration template in the table below contains report attribute elements and their corresponding report configuration information. The target report refers to the report that needs to be generated.

表1报表属性Table 1 Report Properties

目标报表target report 数据项data item 数据类型type of data 来源表source table 来源字段source field 计算规则Calculation Rules 计算组别Calculation group Rpt1Rpt1 Tar1Tar1 数字number Src_t1Src_t1 Src_c1Src_c1 SumSum G1G1 Rpt1Rpt1 Tar2Tar2 字符character Src_t2Src_t2 Src_c3Src_c3 MaxMax G2G2 Rtp1Rtp1 Tar3Tar3 字符character Src_t3Src_t3 Src_c4Src_c4 AverageAverage G3G3 ...... ...... ...... ...... ...... ...... ......

表间关系要素可以用以下至少一项信息描述:表名、字段名、关系符号和预设参数。The relationship elements between tables can be described by at least one of the following information: table name, field name, relationship symbol and preset parameters.

表名为数据字典中源数据表的名称,例如“A表名或B表名”。The table name is the name of the source data table in the data dictionary, such as "A table name or B table name".

字段名为源数据表的字段名称。The field name is the field name of the source data table.

关系符号用于表示源数据表之间的大小关系,可以用“=”、“>”或“<”等符号表示。Relational symbols are used to indicate the size relationship between source data tables, and can be represented by symbols such as "=", ">" or "<".

预设参数可以根据报表生成需求确定,本发明实施例对此不作具体限定。The preset parameters may be determined according to the report generation requirement, which is not specifically limited in this embodiment of the present invention.

如表2所示,表2为表间关系示例表。下表的报表配置模板中包含表间关系要素及其对应的报表配置信息。As shown in Table 2, Table 2 is an example table of relationships between tables. The report configuration template in the table below contains the relationship elements between tables and the corresponding report configuration information.

表2表间关系Table 2 Relationship between tables

A表名A table name A字段名A field name B表名B table name B字段名B field name 关系符号relationship symbol 预设参数Preset parameters Src_t1Src_t1 Src_c5Src_c5 Src_t2Src_t2 Src_c6Src_c6 = Src_t2Src_t2 Src_c7Src_c7 Src_t3Src_t3 Src_c8Src_c8 = Src_t1Src_t1 Src_c9Src_c9 >> 1010 ...... ...... ...... ...... ...... ......

报表维度要素可以用以下至少一项信息描述:属性名、维度依赖表和维度依赖字段。Report dimension elements can be described by at least one of the following information: attribute name, dimension dependent table and dimension dependent field.

属性名可以为源数据表的属性名称。The attribute name can be the attribute name of the source data table.

维度依赖表可以表示报表维度所依赖的源数据表。A dimension dependent table can represent a source data table on which a report dimension depends.

维度依赖字段可以表示报表维度所依赖的字段信息。Dimension dependent fields can represent field information on which report dimensions depend.

如表3所示,表3为表间关系示例表。下表的报表配置模板中包含报表维度要素及其对应的报表配置信息。目标报表指的是需要生成的报表。As shown in Table 3, Table 3 is an example table of relationships between tables. The report configuration template in the table below contains report dimension elements and their corresponding report configuration information. The target report refers to the report that needs to be generated.

表3报表维度Table 3 Report Dimensions

目标报表target report 属性名attribute name 维度依赖表dimension dependent table 维度依赖字段Dimension dependent fields Rpt1Rpt1 Tar1Tar1 Src_t1Src_t1 Src_c1Src_c1 Rpt1Rpt1 Tar1Tar1 Src_t2Src_t2 Src_c7Src_c7 Rpt1Rpt1 Rpt_timeRpt_time Day:01:00:00Day: 01:00:00

本发明提供的报表生成方法,通过设计不同类型的报表配置模板,将报表开发过程标准化和格式化,从而可以提高数据的提取效率,便于生成新的各个维度的报表。The report generation method provided by the present invention standardizes and formats the report development process by designing different types of report configuration templates, thereby improving the efficiency of data extraction and facilitating the generation of new reports of various dimensions.

在一些实施例中,基于报表配置信息,生成报表加工程序,包括:In some embodiments, a report processing program is generated based on report configuration information, including:

将报表配置信息导入至目标数据库对应的配置表中,生成报表加工程序,并将编译后的报表加工程序存储于目标数据库。Import the report configuration information into the configuration table corresponding to the target database, generate a report processing program, and store the compiled report processing program in the target database.

在实际执行中,目标数据库可以包括:Oracle数据库、SQLServer数据库、DB2数据库或Mysql数据库等。In actual execution, the target database may include: an Oracle database, a SQLServer database, a DB2 database, or a Mysql database.

以Oracle数据库为例来说明本发明实施例。Oracle数据库系统是主流关系数据库管理系统,该数据库系统可移植性好、使用方便、功能强,适用于各类大、中、小微机环境。它是一种高效率的、可靠性好的、适应高吞吐量的数据库方案。The embodiment of the present invention is described by taking an Oracle database as an example. The Oracle database system is a mainstream relational database management system. The database system has good portability, convenient use, and strong functions, and is suitable for various large, medium, and small computer environments. It is a high-efficiency, reliable, and high-throughput database solution.

将报表配置信息导入Oracle数据库对应的配置表中,使用PL/SQL语言编写程序,根据报表配置模板中各类要素对应的具体信息,自动生成报表源码信息,即报表加工程序。并将编译后的报表加工程序存储在Oracle数据库对应的服务器中。Import the report configuration information into the configuration table corresponding to the Oracle database, write the program in PL/SQL language, and automatically generate the report source code information, that is, the report processing program, according to the specific information corresponding to various elements in the report configuration template. And store the compiled report processing program in the server corresponding to the Oracle database.

其中,PL/SQL为过程化SQL语言(Procedural Language/SQL,PL/SQL)。PL/SQL是Oracle数据库对SQL语句的扩展。在普通SQL语句的使用上增加了编程语言的特点,所以PL/SQL把数据操作和查询语句组织在PL/SQL代码的过程性单元中,通过逻辑判断、循环等操作实现复杂的功能或者计算。Wherein, PL/SQL is a procedural SQL language (Procedural Language/SQL, PL/SQL). PL/SQL is an extension of the Oracle database to SQL statements. The characteristics of programming language are added to the use of ordinary SQL statements, so PL/SQL organizes data operations and query statements in procedural units of PL/SQL code, and realizes complex functions or calculations through logical judgments, loops and other operations.

本发明提供的报表生成方法,可以根据报表配置模板自动生成报表加工程序,并将报表加工程序编译存储于目标数据库中,从而可以随时调用报表加工程序生成报表,从而简化了报表开发过程,提高报表生成效率。The report generation method provided by the present invention can automatically generate a report processing program according to the report configuration template, and compile and store the report processing program in the target database, so that the report processing program can be called at any time to generate a report, thereby simplifying the report development process and improving the report performance. Generate efficiency.

在一些实施例中,基于报表加工程序,生成报表生成需求对应的目标报表之后,还包括:In some embodiments, based on the report processing program, after generating the target report corresponding to the report generation requirement, it further includes:

基于目标报表,更新数据字典,数据字典用于存储所有报表对应的源数据表和源数据表对应的字段信息。Based on the target report, the data dictionary is updated, and the data dictionary is used to store the source data tables corresponding to all reports and the field information corresponding to the source data tables.

为进一步提高报表生成效率,可以维护一份准确的数据字典,数据字典中可以包括报表使用到的所有源数据表和源数据表对应的字段信息。In order to further improve the efficiency of report generation, an accurate data dictionary can be maintained, which can include all source data tables used in the report and the field information corresponding to the source data tables.

对于生成的新目标报表,则可以将该目标报表的报表信息和报表信息来源表存入数据字典中,以实时更新数据字典。For the generated new target report, the report information and report information source table of the target report can be stored in the data dictionary, so as to update the data dictionary in real time.

数据字典中的信息可以用于确定报表配置模板中的报表配置信息。The information in the data dictionary can be used to determine the report configuration information in the report configuration template.

在实际执行中,数据字典中具体可包括如下至少一项信息:数据表名、表属性、表字段名称、数据类型和关键字段等。In actual implementation, the data dictionary may specifically include at least one item of information as follows: data table name, table attribute, table field name, data type, key field, and the like.

数据表名即为数据表的名称。The data table name is the name of the data table.

表字段名称即为数据表中字段信息的名称。The table field name is the name of the field information in the data table.

数据类型即为数据表中数据的类型,例如可以是数字或字符等。关键字段为数据表中的关键字段信息,例如可以是索引字段。The data type is the type of data in the data table, such as numbers or characters. The key field is the key field information in the data table, for example, it may be an index field.

本发明提供的报表生成方法,通过设置数据字典,可以将报表相关信息全部整合在一起,方便对报表工具进行扩展和维护,减少报表开发成本。The report generating method provided by the present invention can integrate all report-related information together by setting a data dictionary, facilitates the expansion and maintenance of report tools, and reduces the cost of report development.

在一些实施例中,基于报表配置信息,生成报表加工程序之后,还包括:In some embodiments, after the report processing program is generated based on the report configuration information, it further includes:

在目标数据库中创建报表加工程序对应的调度程序,调度程序用于调用报表加工程序,并输出目标报表。Create a scheduler corresponding to the report processing program in the target database, and the scheduler is used to call the report processing program and output the target report.

以Oracle数据库为例来说明本发明实施例。根据报表配置模板,在Oracel数据库中创建调度程序scheduler_job,可以实现报表加工程序的自动调用。The embodiment of the present invention is described by taking an Oracle database as an example. According to the report configuration template, create a scheduler_job in the Oracle database, which can realize the automatic call of the report processing program.

此调度程序可以按照用户设置的调用周期,定时调用报表加工程序来生成报表生成需求对应的目标报表,调用周期可以设置为一天、一周或一个月等,本发明实施例对此不作具体限定。The scheduling program can periodically call the report processing program to generate the target report corresponding to the report generation requirement according to the call cycle set by the user. The call cycle can be set to one day, one week or one month, etc., which is not specifically limited in the embodiment of the present invention.

例如:在oracle数据库中注册scheduler_job,并将报表加工程序的调用周期设置为一周,具体为每周一上午九点定时调用报表加工程序,则在每周一上午九点,服务器可以根据注册的scheduler_job,调用报表加工程序,以生成最新的目标报表。For example: register scheduler_job in the oracle database, and set the call cycle of the report processing program to one week, specifically call the report processing program regularly at 9:00 am every Monday, then at 9:00 am every Monday, the server can call according to the registered scheduler_job Report processing procedures to generate the latest target reports.

可以理解的是,可以根据实际需求选择是否在目标数据库中注册调度程序。It can be understood that whether to register the scheduler in the target database can be selected according to actual needs.

若在目标数据库中注册调度程序,则可以定时调用报表加工程序生成目标报表。If the scheduler is registered in the target database, the report processing program can be called periodically to generate the target report.

若不在目标数据库中注册调度程序,则可以直接调用当前生成的报表加工程序生成目标报表。If you do not register the scheduler in the target database, you can directly call the currently generated report processing program to generate the target report.

本发明提供的报表生成方法,通过在目标数据裤中创建调度程序,无需再次提交报表生成需求,就可以实现定时生成报表,进一步简化了报表开发过程。The report generation method provided by the present invention can generate reports at regular intervals without submitting report generation requirements again by creating a scheduling program in the target database, which further simplifies the report development process.

在一些实施例中,可以按照如下步骤执行本发明实施例提供的报表生成方法:In some embodiments, the report generation method provided by the embodiment of the present invention can be executed according to the following steps:

(1)报表信息定义,根据用户需求和报表配置模板,定义报表信息以及信息获取规则,即确定报表配置信息。(1) Report information definition, according to user requirements and report configuration templates, define report information and information acquisition rules, that is, determine report configuration information.

(2)维护数据字典,将报表信息以及报表信息来源表维护于数据字典中。(2) Maintain the data dictionary, maintain the report information and report information source table in the data dictionary.

(3)将报表配置信息导入到oracle数据库的对应配置表中。(3) Import the report configuration information into the corresponding configuration table of the oracle database.

(4)生成报表加工程序,并在oracle服务器中存储编译。(4) Generate a report processing program, and store and compile it in the oracle server.

(5)注册oracle的scheduler_job。(5) Register the scheduler_job of oracle.

(6)生成用户需求对应的报表。(6) Generate reports corresponding to user needs.

在一些实施例中,本发明还提供一种报表生成系统,该系统可以包括如下功能模块:数据字典模块、报表配置模块、报表加工程序生成模块、报表生成任务模块和报表生成模块。In some embodiments, the present invention also provides a report generation system, which may include the following functional modules: a data dictionary module, a report configuration module, a report processing program generation module, a report generation task module, and a report generation module.

数据字典模块,用于维护一份准确的数据字典,包括报表使用到的所有源数据表和字段信息,并将新的报表信息放入数据字典中。The data dictionary module is used to maintain an accurate data dictionary, including all source data tables and field information used in the report, and put new report information into the data dictionary.

报表配置模块,用于定义报表详细信息包括各信息的来源及信息获取规则,确定报表配置信息。The report configuration module is used to define report details including sources of information and information acquisition rules, and to determine report configuration information.

报表加工程序生成模块,用于基于数据字典和报表配置模板,自动生成报表加工程序。The report processing program generation module is used to automatically generate report processing programs based on the data dictionary and report configuration templates.

报表生成任务模块,用于根据报表配置模板,生成oracle的scheduler_job,并在oracle数据库中注册scheduler_job。The report generation task module is used to generate the oracle scheduler_job according to the report configuration template, and register the scheduler_job in the oracle database.

报表生成模块,用于调用报表加工程序,生成最终的报表。The report generation module is used to call the report processing program to generate the final report.

在一些实施例中,对于某查询功能的日查询明细统计报表,报表生成需求为要求统计该功能下每日各部门、各用户下查询总数,同时需要展示用户编号、用户名,部门名称、查询日期、查询量(统计值)。In some embodiments, for a daily query detailed statistical report of a certain query function, the report generation requirement is to count the total number of daily queries by each department and user under the function, and at the same time display the user number, user name, department name, query Date, query volume (statistical value).

在数据字典中确定报表配置信息,如表4、表5和表6所示。Determine the report configuration information in the data dictionary, as shown in Table 4, Table 5 and Table 6.

将表4、表5和表6中的报表配置信息导入oracle数据库中,自动生成报表加工程序CRT_REQUERY_CRD_IDV_RPT。Import the report configuration information in Table 4, Table 5 and Table 6 into the oracle database, and automatically generate the report processing program CRT_REQUERY_CRD_IDV_RPT.

将报表加工程序存储在oracle数据库中,并在oracle数据库的调度任务中注册CRT_REQUERY_CRD_IDV_RPT_JOB任务,实现在每日00:00:00时刻自动生成前一日的查询统计报表,即日查询明细统计报表。Store the report processing program in the oracle database, and register the CRT_REQUERY_CRD_IDV_RPT_JOB task in the scheduling task of the oracle database, so as to automatically generate the query statistics report of the previous day at 00:00:00 every day, and query the detailed statistics report of the same day.

表4日查询明细统计报表的报表属性配置Table 4 Report Attribute Configuration of Query Detailed Statistical Report

Figure BDA0003748930810000121
Figure BDA0003748930810000121

表5日查询明细统计报表的表间关系配置Inter-table relationship configuration of query detailed statistics report on Table 5

A表名A table name A字段名A field name B表名B table name B字段名B field name 关系符号relationship symbol 参数parameter Req_Crdrpt_IntReq_Crdrpt_Int CstIdCstId Sys_user_infSys_user_inf CstIdCstId = Sys_user_infSys_user_inf DeptNoDeptNo Sys_org_infSys_org_inf DeptNoDeptNo = Req_Crdrpt_IntReq_Crdrpt_Int CrtTimeCrtTime >> Sysdate-1Sysdate-1 Req_Crdrpt_IntReq_Crdrpt_Int CrtTimeCrtTime << SysdateSysdate

表6日查询明细统计报表的报表维度配置Report dimension configuration of query detailed statistics report on Table 6

报表report 属性名attribute name 维度依赖表dimension dependent table 维度依赖字段Dimension dependent fields REQUERY_CRD_IDV_RPTREQUERY_CRD_IDV_RPT 用户编号user ID Sys_user_infSys_user_inf CstIdCstId REQUERY_CRD_IDV_RPTREQUERY_CRD_IDV_RPT 部门名称Department name Sys_org_infSys_org_inf DeptNameDeptName REQUERY_CRD_IDV_RPTREQUERY_CRD_IDV_RPT 查询日期query date Req_Crdrpt_IntReq_Crdrpt_Int CrtTimeCrtTime REQUERY_CRD_IDV_RPTREQUERY_CRD_IDV_RPT Rpt_timeRpt_time Day:00:00:00Day: 00:00:00

本发明实施例提供的报表生成方法,通过维护报表配置模板和数据字典即可通过oracle数据库完成一个报表的开发,简化报表开发过程,还可以快速响应用户的报表生成需求。The report generation method provided by the embodiment of the present invention can complete the development of a report through the oracle database by maintaining the report configuration template and the data dictionary, simplify the report development process, and quickly respond to the user's report generation needs.

下面对本发明提供的报表生成装置进行描述,下文描述的报表生成装置与上文描述的报表生成方法可相互对应参照。The report generation device provided by the present invention is described below, and the report generation device described below and the report generation method described above can be referred to in correspondence.

图2为本发明提供的报表生成装置的结构示意图。参照图2,本发明提供的报表生成装置可以包括:确定模块210、第一生成模块220和第二生成模块230。FIG. 2 is a schematic structural diagram of a report generation device provided by the present invention. Referring to FIG. 2 , the report generation device provided by the present invention may include: a determination module 210 , a first generation module 220 and a second generation module 230 .

确定模块210,用于基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;The determination module 210 is configured to determine report configuration information based on the report generation requirement and the report configuration template, and the report configuration information is used to indicate the source of report information and information acquisition rules corresponding to the report generation requirement;

第一生成模块220,用于基于所述报表配置信息,生成报表加工程序;The first generating module 220 is configured to generate a report processing program based on the report configuration information;

第二生成模块230,用于基于所述报表加工程序,生成所述报表生成需求对应的目标报表。The second generation module 230 is configured to generate a target report corresponding to the report generation requirement based on the report processing program.

本发明提供的报表生成装置,通过报表配置模板生成报表加工程序,进而可以根据报表加工程序直接生成目标报表,简化了报表开发过程,还可以快速响应用户的报表生成需求,得到满足需求的目标报表。The report generation device provided by the present invention generates a report processing program through a report configuration template, and then can directly generate a target report according to the report processing program, which simplifies the report development process, and can also quickly respond to the report generation needs of users, and obtain target reports that meet the requirements .

在一些实施例中,所述报表生成装置还包括:In some embodiments, the report generation device also includes:

构建模块(图中未示出),用于基于报表属性要素、表间关系要素和报表维度要素,构建所述报表配置模板。A construction module (not shown in the figure), configured to construct the report configuration template based on report attribute elements, inter-table relationship elements and report dimension elements.

在一些实施例中,所述报表属性要素包括以下至少一项:数据项、数据类型、来源表、来源字段、计算规则和计算组别;In some embodiments, the report attribute elements include at least one of the following: data item, data type, source table, source field, calculation rule and calculation group;

所述表间关系要素包括以下至少一项:表名、字段名、关系符号和预设参数;The relationship elements between tables include at least one of the following: table name, field name, relationship symbol and preset parameters;

所述报表维度要素包括以下至少一项:属性名、维度依赖表和维度依赖字段。The report dimension element includes at least one of the following: attribute name, dimension dependent table and dimension dependent field.

在一些实施例中,所述第一生成模块220,还用于:In some embodiments, the first generation module 220 is further configured to:

将所述报表配置信息导入至目标数据库对应的配置表中,生成所述报表加工程序,并将编译后的报表加工程序存储于所述目标数据库。Importing the report configuration information into the configuration table corresponding to the target database, generating the report processing program, and storing the compiled report processing program in the target database.

在一些实施例中,所述报表生成装置还包括:In some embodiments, the report generation device also includes:

更新模块(图中未示出),用于基于所述目标报表,更新数据字典,所述数据字典用于存储所有报表对应的源数据表和所述源数据表对应的字段信息。An updating module (not shown in the figure) is configured to update a data dictionary based on the target report, and the data dictionary is used to store source data tables corresponding to all reports and field information corresponding to the source data tables.

在一些实施例中,所述报表生成装置还包括:In some embodiments, the report generation device also includes:

调度模块(图中未示出),用于在目标数据库中创建所述报表加工程序对应的调度程序,所述调度程序用于调用所述报表加工程序,并输出所述目标报表。A scheduling module (not shown in the figure) is configured to create a scheduling program corresponding to the report processing program in the target database, and the scheduling program is used to call the report processing program and output the target report.

图3示例了一种电子设备的实体结构示意图,如图3所示,该电子设备可以包括:处理器(processor)310、通信接口(Communications Interface)320、存储器(memory)330和通信总线340,其中,处理器310,通信接口320,存储器330通过通信总线340完成相互间的通信。处理器310可以调用存储器330中的逻辑指令,以执行报表生成方法,该方法包括:FIG. 3 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG. 3 , the electronic device may include: a processor (processor) 310, a communication interface (Communications Interface) 320, a memory (memory) 330 and a communication bus 340, Wherein, the processor 310 , the communication interface 320 , and the memory 330 communicate with each other through the communication bus 340 . The processor 310 can call the logic instructions in the memory 330 to execute the method for generating a report, and the method includes:

基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate a report information source and an information acquisition rule corresponding to the report generation requirement;

基于所述报表配置信息,生成报表加工程序;Generate a report processing program based on the report configuration information;

基于所述报表加工程序,生成所述报表生成需求对应的目标报表。Based on the report processing program, a target report corresponding to the report generation requirement is generated.

此外,上述的存储器330中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the memory 330 may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .

另一方面,本发明还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各方法所提供的报表生成方法,该方法包括:On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can Execute the report generation method provided by each of the above methods, the method includes:

基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate a report information source and an information acquisition rule corresponding to the report generation requirement;

基于所述报表配置信息,生成报表加工程序;Generate a report processing program based on the report configuration information;

基于所述报表加工程序,生成所述报表生成需求对应的目标报表。Based on the report processing program, a target report corresponding to the report generation requirement is generated.

又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的报表生成方法,该方法包括:In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to execute the report generation method provided by the above-mentioned methods, the method comprising:

基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate a report information source and an information acquisition rule corresponding to the report generation requirement;

基于所述报表配置信息,生成报表加工程序;Generate a report processing program based on the report configuration information;

基于所述报表加工程序,生成所述报表生成需求对应的目标报表。Based on the report processing program, a target report corresponding to the report generation requirement is generated.

以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative efforts.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.

最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims (10)

1.一种报表生成方法,其特征在于,包括:1. A report generation method, characterized in that, comprising: 基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;Determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate a report information source and an information acquisition rule corresponding to the report generation requirement; 基于所述报表配置信息,生成报表加工程序;Generate a report processing program based on the report configuration information; 基于所述报表加工程序,生成所述报表生成需求对应的目标报表。Based on the report processing program, a target report corresponding to the report generation requirement is generated. 2.根据权利要求1所述的报表生成方法,其特征在于,所述基于报表生成需求和报表配置模板,确定报表配置信息之前,还包括:2. The report generation method according to claim 1, characterized in that, before the report configuration information is determined based on the report generation requirements and the report configuration template, it also includes: 基于报表属性要素、表间关系要素和报表维度要素,构建所述报表配置模板。The report configuration template is constructed based on report attribute elements, inter-table relationship elements and report dimension elements. 3.根据权利要求2所述的报表生成方法,其特征在于,所述报表属性要素包括以下至少一项:数据项、数据类型、来源表、来源字段、计算规则和计算组别;3. The report generating method according to claim 2, wherein the report attribute elements include at least one of the following: data item, data type, source table, source field, calculation rule and calculation group; 所述表间关系要素包括以下至少一项:表名、字段名、关系符号和预设参数;The relationship elements between tables include at least one of the following: table name, field name, relationship symbol and preset parameters; 所述报表维度要素包括以下至少一项:属性名、维度依赖表和维度依赖字段。The report dimension element includes at least one of the following: attribute name, dimension dependent table and dimension dependent field. 4.根据权利要求1-3任一项所述的报表生成方法,其特征在于,所述基于所述报表配置信息,生成报表加工程序,包括:4. The report generating method according to any one of claims 1-3, wherein said generating a report processing program based on said report configuration information includes: 将所述报表配置信息导入至目标数据库对应的配置表中,生成所述报表加工程序,并将编译后的报表加工程序存储于所述目标数据库。Importing the report configuration information into the configuration table corresponding to the target database, generating the report processing program, and storing the compiled report processing program in the target database. 5.根据权利要求1-3任一项所述的报表生成方法,其特征在于,所述基于所述报表加工程序,生成所述报表生成需求对应的目标报表之后,还包括:5. The report generating method according to any one of claims 1-3, characterized in that, after generating the target report corresponding to the report generation requirement based on the report processing program, further comprising: 基于所述目标报表,更新数据字典,所述数据字典用于存储所有报表对应的源数据表和所述源数据表对应的字段信息。Based on the target report, a data dictionary is updated, and the data dictionary is used to store source data tables corresponding to all reports and field information corresponding to the source data tables. 6.根据权利要求1-3任一项所述的报表生成方法,其特征在于,所述基于所述报表配置信息,生成报表加工程序之后,还包括:6. The report generation method according to any one of claims 1-3, characterized in that, after generating the report processing program based on the report configuration information, further comprising: 在目标数据库中创建所述报表加工程序对应的调度程序,所述调度程序用于调用所述报表加工程序,并输出所述目标报表。A scheduling program corresponding to the report processing program is created in the target database, and the scheduling program is used to call the report processing program and output the target report. 7.一种报表生成装置,其特征在于,包括:7. A report generation device, characterized in that, comprising: 确定模块,用于基于报表生成需求和报表配置模板,确定报表配置信息,所述报表配置信息用于指示所述报表生成需求对应的报表信息来源和信息获取规则;A determining module, configured to determine report configuration information based on the report generation requirement and the report configuration template, where the report configuration information is used to indicate the source of report information and information acquisition rules corresponding to the report generation requirement; 第一生成模块,用于基于所述报表配置信息,生成报表加工程序;A first generating module, configured to generate a report processing program based on the report configuration information; 第二生成模块,用于基于所述报表加工程序,生成所述报表生成需求对应的目标报表。The second generation module is configured to generate a target report corresponding to the report generation requirement based on the report processing program. 8.一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至6任一项所述报表生成方法。8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor according to claim 1 is implemented when executing the program. The report generation method described in any one of to 6. 9.一种非暂态计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述报表生成方法。9. A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the report generating method according to any one of claims 1 to 6 is implemented. 10.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述报表生成方法。10. A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the report generating method according to any one of claims 1 to 6 is implemented.
CN202210837034.0A 2022-07-15 2022-07-15 Report generation method, report generation device, electronic equipment and storage medium Pending CN115374761A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210837034.0A CN115374761A (en) 2022-07-15 2022-07-15 Report generation method, report generation device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210837034.0A CN115374761A (en) 2022-07-15 2022-07-15 Report generation method, report generation device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115374761A true CN115374761A (en) 2022-11-22

Family

ID=84060909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210837034.0A Pending CN115374761A (en) 2022-07-15 2022-07-15 Report generation method, report generation device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115374761A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119761325A (en) * 2024-12-30 2025-04-04 中国民航信息网络股份有限公司 Transaction report generation method, system, device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004758A (en) * 2007-01-26 2007-07-25 华为技术有限公司 Method and corresponding system for creating and obtaining report forms
CN111177231A (en) * 2019-12-20 2020-05-19 中国建设银行股份有限公司 Report generation method and report generation device
CN111259643A (en) * 2019-12-10 2020-06-09 深圳市远行科技股份有限公司 Method and equipment for generating graphical report
CN112199928A (en) * 2020-10-16 2021-01-08 深圳无域科技技术有限公司 Report system based on machine learning and report generation method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101004758A (en) * 2007-01-26 2007-07-25 华为技术有限公司 Method and corresponding system for creating and obtaining report forms
CN111259643A (en) * 2019-12-10 2020-06-09 深圳市远行科技股份有限公司 Method and equipment for generating graphical report
CN111177231A (en) * 2019-12-20 2020-05-19 中国建设银行股份有限公司 Report generation method and report generation device
CN112199928A (en) * 2020-10-16 2021-01-08 深圳无域科技技术有限公司 Report system based on machine learning and report generation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119761325A (en) * 2024-12-30 2025-04-04 中国民航信息网络股份有限公司 Transaction report generation method, system, device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN112269792B (en) Data query method, device, equipment and computer readable storage medium
CN113342821B (en) Report configuration method, device, equipment and computer storage medium
US10210236B2 (en) Storing and retrieving data of a data cube
CN110335009A (en) Report generation method, device, computer equipment and storage medium
CN108280234B (en) Data query method and device
CN111708805A (en) Data query method, device, electronic device and storage medium
CN103262076A (en) Analytical data processing
CN112650743B (en) Funnel data analysis method, system, electronic equipment and storage medium
CN101673287A (en) SQL sentence generation method and system
US9864789B2 (en) Method and system for implementing an on-demand data warehouse
CN108628972A (en) A kind of processing method of tables of data, device and storage medium
CN115408453A (en) Configured report generation method and device, computer equipment and storage medium
CN116628018A (en) A data query method, device, server and storage medium
CN115374761A (en) Report generation method, report generation device, electronic equipment and storage medium
WO2018053889A1 (en) Distributed computing framework and distributed computing method
JP2024518051A (en) Efficient storage and querying of schemaless data
CN110032615B (en) Method for realizing GIS spatial data online statistics based on rule base
CN120256446A (en) A big data index management method and system based on weak model
CN117422137A (en) Intelligent association method and system for business process nodes and knowledge graph
CN114328537A (en) Construction method of wide-table query designer
CN110110211A (en) Data query method and apparatus based on universal model
CN115470279A (en) Data source conversion method, device, equipment and medium based on enterprise data
CN115034917A (en) Screening method and device for social security fund release data risk information
US11138174B2 (en) Electronic database and method for forming same
CN115617790A (en) Data warehouse creation method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination