[go: up one dir, main page]

CN104615602B - Device and method for automatically generating query interface - Google Patents

Device and method for automatically generating query interface Download PDF

Info

Publication number
CN104615602B
CN104615602B CN201310541749.2A CN201310541749A CN104615602B CN 104615602 B CN104615602 B CN 104615602B CN 201310541749 A CN201310541749 A CN 201310541749A CN 104615602 B CN104615602 B CN 104615602B
Authority
CN
China
Prior art keywords
query
input
interface
information
condition
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.)
Expired - Fee Related
Application number
CN201310541749.2A
Other languages
Chinese (zh)
Other versions
CN104615602A (en
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.)
Shenzhen Liwei Zhilian Technology Co Ltd
Original Assignee
Shenzhen Liwei Zhilian 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 Shenzhen Liwei Zhilian Technology Co Ltd filed Critical Shenzhen Liwei Zhilian Technology Co Ltd
Priority to CN201310541749.2A priority Critical patent/CN104615602B/en
Publication of CN104615602A publication Critical patent/CN104615602A/en
Application granted granted Critical
Publication of CN104615602B publication Critical patent/CN104615602B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明属于计算机应用技术领域,公开了一种查询界面自动生成实现装置及其方法,解决了现有技术中查询界面开发工作量大,以及在对计算机应用系统进行变更、升级、扩容等操作时需要对查询界面的开发做同步更新、导致进一步加大开发人员的开发工作量的问题。采用本发明,使得拥有大量查询对象的C/S和B/S系统的查询界面开发工作量大大减少,只需一次设计,就能实现批量查询对象的查询,而且查询界面风格高度统一。并且在计算机应用系统的业务变更、升级、扩容后,开发人员只需要升级数据库,就能实现查询对象增加、删除、修改,而无需对客户端升级,因此一定程度上减少了开发人员的开发工作量。

The invention belongs to the technical field of computer applications, and discloses a device for automatically generating a query interface and a method thereof, which solves the problem of the large workload of developing the query interface in the prior art, and the problems of changing, upgrading, and expanding the computer application system. The development of the query interface needs to be updated synchronously, which further increases the development workload of developers. By adopting the invention, the development workload of the query interface of the C/S and B/S systems with a large number of query objects is greatly reduced, only one design is needed to realize the query of batch query objects, and the style of the query interface is highly unified. And after the business change, upgrade, and expansion of the computer application system, the developer only needs to upgrade the database to realize the addition, deletion, and modification of query objects without upgrading the client, so the development work of the developer is reduced to a certain extent quantity.

Description

查询界面自动生成实现装置及其方法Device and method for automatically generating query interface

技术领域technical field

本发明涉及计算机应用技术领域,尤其涉及一种通过查询界面查询和显示数据的查询界面自动生成实现装置及其方法。The invention relates to the field of computer application technology, in particular to a device and method for automatically generating and realizing a query interface for querying and displaying data through the query interface.

背景技术Background technique

目前,通过查询界面查询和显示数据是一种非常常见的计算机应用,现有的计算机应用系统中,这种查询界面通常是针对已知的查询对象预先设计好的,而不是在查询过程中自动生成的。对于此种方法,如果用在拥有大量查询对象的计算机应用系统中,则开发人员对于查询界面的开发工作量往往很大。例如以报表系统为例,系统中生成的每种报表都需要查询符合一定条件的数据集,并按照要求的格式呈现,其界面开发的工作有:At present, querying and displaying data through a query interface is a very common computer application. In existing computer application systems, such query interfaces are usually pre-designed for known query objects, rather than being automatically processed during the query process. Generated. For this method, if it is used in a computer application system with a large number of query objects, developers often have a lot of work to develop the query interface. For example, taking the report system as an example, each report generated in the system needs to query data sets that meet certain conditions and present them in the required format. The interface development work includes:

1、为了告诉用户系统提供哪些报表,界面上要把可提供的所有报表种类显示出来。1. In order to tell the user which reports the system provides, all types of reports that can be provided should be displayed on the interface.

2、为了获取某一种被选中的报表要呈现的数据,需要查询符合一组特定条件的数据集,这时需要设计界面以让用户输入这组特定条件,即设计查询条件界面。由于各种不同的报表的查询条件不尽相同,因此每种报表都要单独设计各自相应的查询条件界面。2. In order to obtain the data to be presented by a selected report, it is necessary to query a data set that meets a set of specific conditions. At this time, it is necessary to design an interface to allow users to input this set of specific conditions, that is, to design the query condition interface. Since the query conditions of various reports are not the same, each type of report needs to design its own corresponding query condition interface.

3、每种报表的格式都不一样,例如对于不同的报表来说,其列内容不尽相同,甚至不同的报表其风格迥异,因此还需要为每种报表设计各自相应的显示界面。3. The format of each report is different. For example, for different reports, the column content is different, and even different reports have different styles. Therefore, it is necessary to design a corresponding display interface for each report.

众所周知,报表系统中各种报表的种类数量众多,通过上述的界面开发工作不难得知,采用现有技术提供的查询界面设计方法,在报表系统的报表界面开发过程中,开发人员的开发工作量是巨大的。As we all know, there are many types of reports in the report system. It is not difficult to know through the above-mentioned interface development work. Using the query interface design method provided by the existing technology, in the process of developing the report interface of the report system, the developer's development workload is huge.

另外,随着计算机应用系统业务的变更、升级、扩容等,查询对象也面临着增加、修改、删除的需求,例如报表系统中就存在着需要按用户要求不定时地增加、删除某些报表、或修改一些报表的需求。此时对于查询界面则可能需要对上述的三项工作内容都进行更新,由此无疑更进一步加大了开发人员的工作量,并且对于C/S(Client/Server,客户机/服务器结构)的计算机应用系统而言,还不得不面临着对客户端进行升级的问题。In addition, with the change, upgrade, and expansion of the computer application system business, the query objects are also faced with the need to add, modify, and delete. Or modify the requirements of some reports. At this time, for the query interface, it may be necessary to update the above three work contents, which undoubtedly further increases the workload of the developer, and for the C/S (Client/Server, client/server structure) As far as the computer application system is concerned, it has to face the problem of upgrading the client.

发明内容Contents of the invention

为了解决现有技术中查询界面开发工作量大,以及在对计算机应用系统进行变更、升级、扩容等操作时需要对查询界面的开发做同步更新、导致进一步加大开发人员的开发工作量的问题,本发明实施例的目的在于提供一种通过查询界面查询和显示数据的查询界面自动生成实现装置及其方法。In order to solve the problem that the development workload of the query interface in the prior art is large, and the development of the query interface needs to be updated synchronously when the computer application system is changed, upgraded, and expanded, which further increases the development workload of the developer. , The object of the embodiments of the present invention is to provide a device and method for automatically generating and realizing a query interface for querying and displaying data through a query interface.

为了达到本发明的目的,本发明采用以下技术方案实现:In order to achieve the purpose of the present invention, the present invention adopts the following technical solutions to realize:

一种查询界面自动生成实现装置,其包括:A device for automatically generating an inquiry interface, comprising:

数据库,其维护了通过外键一相关联的对象结构表与查询对象表、以及通过外键二与所述查询对象表关联起来的输入输出表;A database, which maintains the object structure table and the query object table associated through the foreign key one, and the input and output tables associated with the query object table through the foreign key two;

查询模块,用于在计算机应用系统启动时查询数据库中的对象结构表与查询对象表,以获取所有查询对象及目录结构信息;进一步用于在用户通过用户界面选择查询对象后,据此查询数据库中的输入输出表,以获取查询对象的输入输出信息;以及进一步用于依据接收的查询参数查询数据库中的查询对象表,以获取查询结果;The query module is used to query the object structure table and query object table in the database when the computer application system is started, so as to obtain all query objects and directory structure information; it is further used to query the database accordingly after the user selects the query object through the user interface The input and output table in to obtain the input and output information of the query object; and further used to query the query object table in the database according to the received query parameters to obtain the query result;

界面生成模块,用于将从查询模块获取的所有查询对象及目录结构信息予以组织并以至少一预置的目录呈现策略进行呈现;进一步用于依据从查询模块获取的查询对象的输入输出信息生成接收用户输入查询条件的界面元素,并依据该界面元素生成查询条件输入界面;以及进一步用于在用户通过查询条件输入界面输入查询条件后触发查询操作,并将该查询条件转换成相应的查询参数并传递给查询模块;以及The interface generation module is used to organize all query objects and directory structure information obtained from the query module and present them with at least one preset directory presentation strategy; further used to generate query object input and output information obtained from the query module The interface element that receives the query condition input by the user, and generates the query condition input interface according to the interface element; and is further used to trigger the query operation after the user enters the query condition through the query condition input interface, and converts the query condition into corresponding query parameters and passed to the query module; and

结果显示模块,用于从查询模块获取所述查询结果并显示。The result display module is used to obtain and display the query result from the query module.

优选地,所述对象结构表保存了查询对象的目录结构信息;所述查询对象表保存了各个查询对象与其存储过程的一一对应关系;以及所述输入输出表保存了各个查询对象的输入参数以及输出列信息,其中,所述输入参数信息表示查询条件输入界面上用于接收用户输入查询条件的选择框或输入框形式。Preferably, the object structure table saves the directory structure information of the query object; the query object table saves the one-to-one correspondence between each query object and its stored procedure; and the input-output table saves the input parameters of each query object And output column information, wherein the input parameter information represents a selection box or an input box form on the query condition input interface for receiving user input of query conditions.

优选地,所述界面生成模块依据从查询模块获取的查询对象的输入参数通过反射的方式生成接收用户输入查询条件的界面元素,并结合该界面元素以及该查询对象的其他属性信息生成查询条件输入界面。Preferably, the interface generation module generates an interface element for receiving user input query conditions through reflection according to the input parameters of the query object obtained from the query module, and generates query condition input in combination with the interface elements and other attribute information of the query object interface.

优选地,所述查询对象表还保存了查询结果显示类型属性信息,以及创建人属性信息、以及创建时间属性信息。Preferably, the query object table also stores query result display type attribute information, creator attribute information, and creation time attribute information.

优选地,结果显示模块用于依据与相应查询对象对应的查询结果显示类型属性信息将所述查询结果显示。Preferably, the result display module is configured to display the query result according to the query result display type attribute information corresponding to the corresponding query object.

一种应用如上所述的查询界面自动生成实现装置实现查询界面自动生成的方法,在数据库中维护通过外键一相关联的对象结构表与查询对象表、以及通过外键二与所述查询对象表关联起来的输入输出表,所述方法包括:A method for automatically generating a query interface by using the device for automatically generating the query interface as described above, maintaining in the database the object structure table and the query object table associated with the foreign key one, and the query object through the foreign key two The input and output tables associated with the tables, the method includes:

查询模块在计算机应用系统启动时查询数据库中的对象结构表与查询对象表,以获取所有查询对象及目录结构信息,界面生成模块将从查询模块获取的所有查询对象及目录结构信息予以组织并以至少一预置的目录呈现策略进行呈现;The query module queries the object structure table and query object table in the database when the computer application system is started to obtain all query objects and directory structure information, and the interface generation module organizes all query objects and directory structure information obtained from the query module and forms Presenting at least one preset directory presentation strategy;

在用户通过用户界面选择查询对象后,查询模块据此查询数据库中的输入输出表,以获取查询对象的输入输出信息,界面生成模块依据从查询模块获取的查询对象的输入输出信息生成接收用户输入查询条件的界面元素,并依据该界面元素生成查询条件输入界面;After the user selects the query object through the user interface, the query module queries the input and output tables in the database accordingly to obtain the input and output information of the query object, and the interface generation module generates and receives user input based on the input and output information of the query object obtained from the query module. The interface element of the query condition, and generate the query condition input interface according to the interface element;

在用户通过查询条件输入界面输入查询条件后触发查询操作,界面生成模块将该查询条件转换成相应的查询参数并传递给查询模块,查询模块依据接收的查询参数查询数据库中的查询对象表,以获取查询结果;After the user enters the query condition through the query condition input interface, the query operation is triggered, and the interface generation module converts the query condition into corresponding query parameters and passes it to the query module, and the query module queries the query object table in the database according to the received query parameters, to Get query results;

以及,结果显示模块将从查询模块获取的所述查询结果予以显示。And, the result display module displays the query result obtained from the query module.

优选地,所述对象结构表保存了查询对象的目录结构信息;所述查询对象表保存了各个查询对象与其存储过程的一一对应关系;以及所述输入输出表保存了各个查询对象的输入参数以及输出列信息,其中,所述输入参数信息表示查询条件输入界面上用于接收用户输入查询条件的选择框或输入框形式。Preferably, the object structure table saves the directory structure information of the query object; the query object table saves the one-to-one correspondence between each query object and its stored procedure; and the input-output table saves the input parameters of each query object And output column information, wherein the input parameter information represents a selection box or an input box form on the query condition input interface for receiving user input of query conditions.

优选地,所述界面生成模块依据从查询模块获取的查询对象的输入参数通过反射的方式生成接收用户输入查询条件的界面元素,并结合该界面元素以及该查询对象的其他属性信息生成查询条件输入界面。Preferably, the interface generation module generates an interface element for receiving user input query conditions through reflection according to the input parameters of the query object obtained from the query module, and generates query condition input in combination with the interface elements and other attribute information of the query object interface.

优选地,所述查询对象表还保存了查询结果显示类型属性信息,以及创建人属性信息、以及创建时间属性信息。Preferably, the query object table also stores query result display type attribute information, creator attribute information, and creation time attribute information.

优选地,结果显示模块用于依据与相应查询对象对应的查询结果显示类型属性信息将所述查询结果显示。Preferably, the result display module is configured to display the query result according to the query result display type attribute information corresponding to the corresponding query object.

与现有技术相比,本发明使得拥有大量查询对象的C/S和B/S(Browser/Server,浏览器/服务器模式)系统的查询界面开发工作量大大减少,只需一次设计,就能实现批量查询对象的查询,而且查询界面风格高度统一。并且在计算机应用系统的业务变更、升级、扩容后,开发人员只需要升级数据库,就能实现查询对象增加、删除、修改,而无需对客户端升级,因此一定程度上减少了开发人员的开发工作量。Compared with the prior art, the present invention greatly reduces the development workload of the query interface of the C/S and B/S (Browser/Server, browser/server mode) systems with a large number of query objects, only needs one design, and can Realize the query of batch query objects, and the query interface style is highly unified. And after the business change, upgrade, and expansion of the computer application system, the developer only needs to upgrade the database to realize the addition, deletion, and modification of query objects without upgrading the client, thus reducing the development work of the developer to a certain extent quantity.

附图说明Description of drawings

图1是本发明实施例提供的查询界面自动生成实现装置结构示意图;Fig. 1 is a schematic structural diagram of a device for automatically generating a query interface provided by an embodiment of the present invention;

图2是本发明实施例提供的查询界面自动生成实现方法流程示意图;Fig. 2 is a schematic flowchart of a method for automatically generating a query interface provided by an embodiment of the present invention;

图3是本发明一具体实施例提供的查询界面自动生成实现方法流程示意图;Fig. 3 is a schematic flow diagram of a method for realizing the automatic generation of a query interface provided by a specific embodiment of the present invention;

本发明目的的实现、功能特点及优异效果,下面将结合具体实施例以及附图做进一步的说明。The realization of the purpose of the present invention, functional characteristics and excellent effects will be further described below in conjunction with specific embodiments and accompanying drawings.

具体实施方式Detailed ways

下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The technical scheme of the present invention will be described in further detail below in conjunction with the accompanying drawings and specific examples, so that those skilled in the art can better understand the present invention and implement it, but the examples given are not intended to limit the present invention .

应当理解,在本发明实施例的描述中,所述“第一”“第二”仅用于描述目的,而不用于指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。It should be understood that in the description of the embodiments of the present invention, the "first" and "second" are used for description purposes only, and are not used to indicate or imply relative importance or implicitly indicate the quantity of indicated technical features.

如图1所示,本发明实施例提供的一种查询界面自动生成实现装置,其包括:As shown in Figure 1, a device for automatically generating and implementing a query interface provided by an embodiment of the present invention includes:

数据库50,其维护了通过外键一504相关联的对象结构表501与查询对象表502、以及通过外键二505与所述查询对象表502关联起来的输入输出表503;对象结构表501通过外键一504与查询对象表502关联,表示查询对象所属的对象目录。输入输出表503记录了所有查询对象的输入输出列信息,并且通过外键二505与输入输出表503关联,指出与查询对象对应的输入/输出。其中,主键用于唯一标示表中的记录,而所述外键是在子表中创建的主键的副本,用于指回父表中唯一的记录。The database 50 maintains the object structure table 501 associated with the query object table 502 through the foreign key one 504, and the input-output table 503 associated with the query object table 502 through the foreign key two 505; the object structure table 501 is passed A foreign key one 504 is associated with the query object table 502 and indicates the object directory to which the query object belongs. The input-output table 503 records the input-output column information of all query objects, and is associated with the input-output table 503 through a foreign key 2 505, indicating the input/output corresponding to the query object. Wherein, the primary key is used to uniquely mark a record in the table, and the foreign key is a copy of the primary key created in the child table, and is used to point back to the unique record in the parent table.

查询模块30,用于在计算机应用系统启动时从数据库50获取查询对象目录结构和所有查询对象的信息(例如关联的存储过程以及结果显示要求等信息),基于用户的选择操作从数据库50获取单个查询对象的查询条件、输出结果描述和结果显示要求,以及基于用户输入的查询条件从数据库50中自动调用与查询对象相对应的存储过程以获取查询结果。具体地,用于在计算机应用系统启动时查询数据库50中的对象结构表501与查询对象表502,以获取所有查询对象及目录结构信息;进一步用于在用户通过用户界面10选择查询对象后,据此查询数据库50中的输入输出表503,以获取查询对象的输入输出信息;以及进一步用于依据接收的查询参数查询数据库50中的查询对象表502,以获取查询结果,具体地,本实施例中,查询模块30依据接收的查询参数获得和查询对象关联的存储过程,并据此执行动态SQL(Structured Query Language,结构化查询语言)查询数据库50,以获取查询结果,其中,所述存储过程就是一个函数,其用于接收输入参数,并返回结果。The query module 30 is used to obtain the query object directory structure and information of all query objects (such as associated stored procedures and result display requirements) from the database 50 when the computer application system is started, and obtain a single query from the database 50 based on the user's selection operation. The query condition of the query object, the description of the output result and the display requirement of the result, and the stored procedure corresponding to the query object are automatically invoked from the database 50 based on the query condition input by the user to obtain the query result. Specifically, it is used to query the object structure table 501 and the query object table 502 in the database 50 when the computer application system is started, so as to obtain all query objects and directory structure information; According to this, query the input and output table 503 in the database 50 to obtain the input and output information of the query object; and further use it to query the query object table 502 in the database 50 according to the received query parameters to obtain the query results. Specifically, this implementation In an example, the query module 30 obtains the stored procedure associated with the query object according to the received query parameters, and executes dynamic SQL (Structured Query Language, Structured Query Language) query database 50 accordingly to obtain query results, wherein the stored A procedure is a function that takes input parameters and returns a result.

界面生成模块20,用于生成呈现所有查询对象的目录结构界面,单个查询对象接收用户输入的查询条件的查询条件输入界面,以及单个查询对象查询结果显示界面;具体地,用于将从查询模块30获取的所有查询对象及目录结构信息予以组织并以至少一预置的目录呈现策略(例如树结构呈现)进行呈现;进一步用于依据从查询模块30获取的查询对象的输入输出信息生成接收用户输入查询条件的界面元素,并依据该界面元素生成查询条件输入界面;以及进一步用于在用户通过查询条件输入界面输入查询条件后触发查询操作,并将该查询条件转换成相应的查询参数并传递给查询模块30。The interface generating module 20 is used to generate a directory structure interface that presents all query objects, a query condition input interface for a single query object to receive user-input query conditions, and a query result display interface for a single query object; 30. Organize and present all query objects and directory structure information obtained by at least one preset directory presentation strategy (such as tree structure presentation); Input the interface element of the query condition, and generate the query condition input interface according to the interface element; and further be used to trigger the query operation after the user enters the query condition through the query condition input interface, and convert the query condition into the corresponding query parameter and pass it on To query module 30.

以及,结果显示模块40,用于从查询模块30获取所述查询结果并显示。具体地,其基于查询对象的查询输出描述和查询结果显示要求,以要求的方式显示查询结果。在本实施例中,如图1所示,所述结果显示模块40将所述查询结果予以显示时,最终还是通过所述用户界面10具体呈现出来。And, the result display module 40 is configured to obtain and display the query result from the query module 30 . Specifically, it displays the query results in a required manner based on the query output description of the query object and the display requirements of the query results. In this embodiment, as shown in FIG. 1 , when the result display module 40 displays the query result, it is finally presented through the user interface 10 .

在本实施例中,所述数据库50除了记录数据,还保存了查询对象的目录结构、查询对象的查询条件、查询结果的描述、查询结果的显示要求、查询对象的查询操作对应的存储过程。例如,所述对象结构表501保存了查询对象的目录结构信息,所述对象结构表501中有个字段记录目录的上级目录,据此查询模块30能够通过查询所有对象目录来构成查询对象的目录结构;在所述数据库50中,每个查询对象对应一个存储过程以响应用户的查询操作,因此所述查询对象表502保存了各个查询对象与其存储过程的一一对应关系;以及所述输入输出表503保存了各个查询对象的输入参数以及输出列信息。In this embodiment, in addition to recording data, the database 50 also saves the directory structure of the query object, the query condition of the query object, the description of the query result, the display requirement of the query result, and the stored procedure corresponding to the query operation of the query object. For example, the object structure table 501 stores the directory structure information of the query object, and there is a field recording the upper-level directory of the directory in the object structure table 501, so that the query module 30 can form the directory of the query object by querying all object directories structure; in the database 50, each query object corresponds to a stored procedure to respond to the user's query operation, so the query object table 502 stores the one-to-one correspondence between each query object and its stored procedure; and the input and output Table 503 saves the input parameters and output column information of each query object.

在数据库50中,每个查询对象都会有输入参数和输出列。这些属性都保存在输入输出表503这个数据结构中。一个查询对象对应多个输入参数,或没有输入参数,以及一个查询对象肯定会对应有一个或多个输出列。并且输入参数和输出列在界面的表现形式不一样,其中,所述输入参数信息表示查询条件输入界面上用于接收用户输入查询条件的选择框或输入框形式,而输出列表现为结果显示表中的一列。所以在本实施例中,可以定义输入输出标志字段以区分输入参数和输出列。In the database 50, each query object will have input parameters and output columns. These attributes are all stored in the data structure of the input-output table 503 . A query object corresponds to multiple input parameters, or no input parameters, and a query object must correspond to one or more output columns. In addition, the input parameters and output columns have different forms of expression on the interface, wherein the input parameter information represents a selection box or input box form for receiving user input query conditions on the query condition input interface, and the output column is a result display table A column in . Therefore, in this embodiment, an input and output flag field can be defined to distinguish input parameters and output columns.

输入参数不同,其在界面上具有不同的表现形式,如是时间选择框、数值范围选择框还是根据应用定义的一些其他接收用户输入的界面控件。因此,在本实施例中,可以定义“列数据类型”字段以区分各种不同的输入参数。Different input parameters have different forms on the interface, such as a time selection box, a value range selection box, or some other interface controls defined by the application to receive user input. Therefore, in this embodiment, a "column data type" field can be defined to distinguish various input parameters.

输出列也有一些属性决定了界面的表现形式,如是否可以排序、统计、筛选,其均可以由相应的字段来表示。并且在本实施例中,输出列还可以具有一个表示是否存在子报表的标志,如果存在子报表,则在界面上点击该输出列,系统会根据输入参数以及该输出列作为子报表生成的条件,产生一个新的子报表。The output column also has some attributes that determine the display form of the interface, such as whether it can be sorted, counted, and filtered, which can be represented by corresponding fields. And in this embodiment, the output column can also have a flag indicating whether there is a sub-report, if there is a sub-report, click the output column on the interface, and the system will use the input parameters and the output column as the conditions for generating the sub-report , generating a new subreport.

相应地,本实施例中,所述界面生成模块20依据从查询模块30获取的查询对象的输入参数通过反射的方式生成接收用户输入查询条件的界面元素,并结合该界面元素以及该查询对象的其他属性信息生成查询条件输入界面,如结合时间选择框、所有输入参数对应的界面元素(可能有一个或多个,也可能没有)、查询对象的其他信息,如名称、描述、创建人,以及触发查询操作的界面元素(如按钮),生成查询条件输入界面。Correspondingly, in this embodiment, the interface generation module 20 generates an interface element for receiving user input query conditions according to the input parameters of the query object obtained from the query module 30 through reflection, and combines the interface element and the query object Other attribute information generates query condition input interface, such as combining time selection box, interface elements corresponding to all input parameters (maybe one or more, or none), other information of query object, such as name, description, creator, and An interface element (such as a button) that triggers a query operation to generate a query condition input interface.

另外,所述查询对象表502还描述了查询对象的其他属性,例如还保存了查询结果显示类型属性信息,以及创建人属性信息、以及创建时间属性信息。这些属性信息描述了查询对象在界面上的呈现信息,如查询结果显示类型属性信息则指出应该以列表、报表还是其他方式显示查询结果,其中,所述列表、报表还可继续细分为何种相应类型的列表或报表。In addition, the query object table 502 also describes other attributes of the query object, for example, attribute information of query result display type, creator attribute information, and creation time attribute information are stored. These attribute information describe the presentation information of the query object on the interface. For example, the query result display type attribute information indicates whether the query result should be displayed in a list, report or other ways. The list and report can be further subdivided into what kind of corresponding Types of lists or reports.

本实施例中,结果显示模块40用于依据与相应查询对象对应的查询结果显示类型属性信息将所述查询结果显示。结果显示模块40基于查询对象的查询结果显示类型,选择一种结果呈现方式(列表、报表等),并根据查询对象的输出列信息,生成表头,以及表中各列的表现形式(是否可排序、筛选、统计等),接收数据库50返回的查询结果,填充数据。In this embodiment, the result display module 40 is configured to display the query result according to the query result display type attribute information corresponding to the corresponding query object. The result display module 40 selects a result presentation mode (list, report, etc.) based on the query result display type of the query object, and generates a table header and the expression form of each column in the table (whether it is possible or not) according to the output column information of the query object. Sorting, screening, statistics, etc.), receiving the query results returned by the database 50, and filling the data.

结合图1,并参考图2所示,本发明实施例还提供了一种应用如上所述的查询界面自动生成实现装置实现查询界面自动生成的方法,在数据库50中维护通过外键一504相关联的对象结构表501与查询对象表502、以及通过外键二505与所述查询对象表502关联起来的输入输出表503,所述方法包括:In conjunction with Fig. 1, and with reference to Fig. 2, the embodiment of the present invention also provides a method for automatically generating a query interface using the device for automatically generating a query interface as described above, and maintains in the database 50 a correlation through a foreign key-504. Linked object structure table 501 and query object table 502, and the input-output table 503 associated with the query object table 502 through foreign key two 505, the method includes:

S10、查询模块30在计算机应用系统启动时查询数据库50中的对象结构表501与查询对象表502,以获取所有查询对象及目录结构信息,界面生成模块20将从查询模块30获取的所有查询对象及目录结构信息予以组织并以至少一预置的目录呈现策略进行呈现;S10, the query module 30 queries the object structure table 501 and the query object table 502 in the database 50 when the computer application system starts, to obtain all query objects and directory structure information, and the interface generation module 20 will obtain all query objects from the query module 30 and directory structure information are organized and presented with at least one preset directory presentation strategy;

S20、在用户通过用户界面10选择查询对象后,查询模块30据此查询数据库50中的输入输出表503,以获取查询对象的输入输出信息,界面生成模块20依据从查询模块30获取的查询对象的输入输出信息生成接收用户输入查询条件的界面元素,并依据该界面元素生成查询条件输入界面;S20, after the user selects the query object through the user interface 10, the query module 30 queries the input and output table 503 in the database 50 accordingly to obtain the input and output information of the query object, and the interface generation module 20 obtains the query object according to the query module 30 The input and output information generates an interface element that receives user input query conditions, and generates a query condition input interface based on the interface elements;

S30、在用户通过查询条件输入界面输入查询条件后触发查询操作,界面生成模块20将该查询条件转换成相应的查询参数并传递给查询模块30,查询模块30依据接收的查询参数查询数据库50中的查询对象表502,以获取查询结果;S30, after the user inputs the query condition through the query condition input interface, the query operation is triggered, the interface generation module 20 converts the query condition into corresponding query parameters and transmits them to the query module 30, and the query module 30 queries the database 50 according to the received query parameters The query object table 502 to obtain the query result;

S40、以及,结果显示模块40将从查询模块30获取的所述查询结果予以显示。S40, and, the result display module 40 displays the query result obtained from the query module 30 .

本实施例中,所述对象结构表501保存了查询对象的目录结构信息;所述查询对象表502保存了各个查询对象与其存储过程的一一对应关系;以及所述输入输出表503保存了各个查询对象的输入参数以及输出列信息,其中,所述输入参数信息表示查询条件输入界面上用于接收用户输入查询条件的选择框或输入框形式。In this embodiment, the object structure table 501 saves the directory structure information of the query object; the query object table 502 saves the one-to-one correspondence between each query object and its stored procedure; and the input-output table 503 saves each The input parameters and output column information of the query object, wherein the input parameter information represents a selection box or an input box form on the query condition input interface for receiving user input query conditions.

本实施例中,所述界面生成模块20依据从查询模块30获取的查询对象的输入参数通过反射的方式生成接收用户输入查询条件的界面元素,并结合该界面元素以及该查询对象的其他属性信息生成查询条件输入界面。In this embodiment, the interface generation module 20 generates an interface element that receives the query condition input by the user through reflection according to the input parameters of the query object obtained from the query module 30, and combines the interface element and other attribute information of the query object Generate query condition input interface.

本实施例中,所述查询对象表502还保存了查询结果显示类型属性信息,以及创建人属性信息、以及创建时间属性信息。In this embodiment, the query object table 502 also stores the query result display type attribute information, creator attribute information, and creation time attribute information.

本实施例中,结果显示模块40用于依据与相应查询对象对应的查询结果显示类型属性信息将所述查询结果显示。In this embodiment, the result display module 40 is configured to display the query result according to the query result display type attribute information corresponding to the corresponding query object.

结合图1并参考图3所示,其示出了应用本发明实施例提供的实现查询界面自动生成的方法的流程示意图,具体地,其包括如下步骤:Referring to FIG. 1 and referring to FIG. 3 , it shows a schematic flowchart of a method for automatically generating a query interface provided by an embodiment of the present invention. Specifically, it includes the following steps:

步骤1、计算机应用系统启动时,查询模块30自动查询数据库50中的目录结构和所有查询对象的信息,把所有查询对象以目录结构组织起来;Step 1, when the computer application system starts, the query module 30 automatically queries the directory structure in the database 50 and the information of all query objects, and organizes all query objects with the directory structure;

步骤2、界面生成模块20把组织好的查询对象以树形结构形式显示到客户端的用户界面10,当然,除了采用树形结构显示目录之外,也可以采用其它结构,以便于用户找到查询对象;Step 2, the interface generation module 20 displays the organized query object in a tree structure to the user interface 10 of the client. Of course, in addition to using a tree structure to display the directory, other structures can also be used so that the user can find the query object ;

步骤3、用户选择一个查询对象,例如采用鼠标单击左键的形式选中一个查询对象;Step 3, the user selects a query object, for example, selects a query object by clicking the left button of the mouse;

步骤4、查询模块30基于用户的选择开始从数据库50中查询对象的输入参数和输出列;Step 4, the query module 30 starts to query the input parameters and output columns of the object from the database 50 based on the user's selection;

步骤5、界面生成模块20以反射的方式生成输入参数对应的界面元素,并组织其他界面元素,生成查询条件输入界面并显示到用户界面10;Step 5, the interface generation module 20 generates the interface elements corresponding to the input parameters in a reflective manner, and organizes other interface elements, generates the query condition input interface and displays it on the user interface 10;

步骤6、用户界面10上的查询条件输入界面接收用户的查询条件输入,并接受用户输入的查询触发动作;Step 6, the query condition input interface on the user interface 10 receives the user's query condition input, and accepts the query trigger action input by the user;

步骤7、界面生成模块20基于用户的输入,生成查询参数;Step 7, the interface generation module 20 generates query parameters based on the user's input;

步骤8、查询模块30接收查询参数,调用查询对象对应的存储过程进行查询获得查询结果;Step 8, the query module 30 receives the query parameters, calls the stored procedure corresponding to the query object to query and obtain the query results;

步骤9、结果显示模块40基于查询对象的显示类型和输出列信息选择对应的数据呈现方式(例如列表、报表等)、生成表头,并确定各列的表现形式(例如是否可排序、筛选、统计等),填充查询结果数据,并把结果显示在用户界面10上。Step 9, the result display module 40 selects the corresponding data presentation method (such as list, report, etc.) based on the display type of the query object and the output column information, generates the table header, and determines the presentation form of each column (such as whether it can be sorted, filtered, statistics, etc.), fill in the query result data, and display the result on the user interface 10.

以上所述仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related All technical fields are equally included in the scope of patent protection of the present invention.

Claims (10)

1. a kind of query interface automatically generates realization device characterized by comprising
Database, maintain by the associated object structure table of external key one and query object table and by external key two with The input/output list that the query object table associates;
Enquiry module, for inquiring object structure table and query object table in database when computer application system starts, To obtain all query objects and catalog structure information;It is further used for after user selects query object by user interface, The input/output list in database is inquired, accordingly to obtain the input/output information of query object;And it is further used for foundation Query object table in received query argument inquiry database, to obtain query result;
Interface generation module, for by all query objects and catalog structure information that are obtained from enquiry module give tissue and with At least one preset catalogue is presented strategy and is presented;It is further used for the input according to the query object obtained from enquiry module Output information generates the interface element for receiving user input query condition, and generates querying condition according to the interface element and input boundary Face;And it is further used for triggering inquiry operation after user is by querying condition input interface input inquiry condition, and should Querying condition is converted into corresponding query argument and passes to enquiry module;And
Result display module, for obtaining the query result from enquiry module and showing.
2. query interface as described in claim 1 automatically generates realization device, which is characterized in that the object structure table saves The catalog structure information of query object;The query object table saves each query object and a pair for its storing process It should be related to;And the input/output list saves the input parameter and output column information of each query object, wherein described Input paramete information indicates on querying condition input interface for receiving the choice box or input frame shape of user input query condition Formula.
3. query interface as claimed in claim 2 automatically generates realization device, which is characterized in that the interface generation module according to It is generated by way of reflection according to the input parameter of the query object obtained from enquiry module and receives user input query condition Interface element, and other attribute informations of the interface element and the query object is combined to generate querying condition input interface.
4. query interface as claimed in claim 3 automatically generates realization device, which is characterized in that the query object table is also protected Query result display type attribute information and founder's attribute information and creation time attribute information are deposited.
5. query interface as claimed in claim 4 automatically generates realization device, which is characterized in that result display module be used for according to The query result is shown according to query result display type attribute information corresponding with respective queries object.
6. a kind of method that query interface automatically generates, which is applied to query interface as described in claim 1, automatically generates realization dress In setting, which is characterized in that maintenance passes through the associated object structure table of external key one and query object table, Yi Jitong in the database Cross the input/output list that external key two associates with the query object table, which comprises
Object structure table and query object table of the enquiry module when computer application system starts in inquiry database, to obtain All query objects and catalog structure information, interface generation module is by all query objects obtained from enquiry module and catalogue knot Structure information is given tissue and is presented at least one preset catalogue presentation strategy;
After user selects query object by user interface, enquiry module inquires the input/output list in database accordingly, with Obtain the input/output information of query object, input and output of the interface generation module according to the query object obtained from enquiry module Information generates the interface element for receiving user input query condition, and generates querying condition input interface according to the interface element;
In user by triggering inquiry operation after querying condition input interface input inquiry condition, interface generation module is by the inquiry Condition is converted into corresponding query argument and passes to enquiry module, and enquiry module inquires database according to received query argument In query object table, to obtain query result;
And result display module is shown the query result obtained from enquiry module.
7. method as claimed in claim 6, which is characterized in that the object structure table saves the bibliographic structure of query object Information;The query object table saves the one-to-one relationship of each query object Yu its storing process;And the input Output table saves the input parameter and output column information of each query object, wherein the input paramete information expression is looked into Ask the choice box or input box form on condition UI for receiving user input query condition.
8. the method for claim 7, which is characterized in that the interface generation module is looked into according to what is obtained from enquiry module The input parameter for asking object generates the interface element for receiving user input query condition by way of reflection, and combines the interface Other of element and the query object attribute information generate querying condition input interface.
9. method according to claim 8, which is characterized in that the query object table also saves query result display type Attribute information and founder's attribute information and creation time attribute information.
10. method as claimed in claim 9, which is characterized in that result display module is used for foundation and respective queries object pair The query result display type attribute information answered shows the query result.
CN201310541749.2A 2013-11-05 2013-11-05 Device and method for automatically generating query interface Expired - Fee Related CN104615602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310541749.2A CN104615602B (en) 2013-11-05 2013-11-05 Device and method for automatically generating query interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310541749.2A CN104615602B (en) 2013-11-05 2013-11-05 Device and method for automatically generating query interface

Publications (2)

Publication Number Publication Date
CN104615602A CN104615602A (en) 2015-05-13
CN104615602B true CN104615602B (en) 2019-09-20

Family

ID=53150052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310541749.2A Expired - Fee Related CN104615602B (en) 2013-11-05 2013-11-05 Device and method for automatically generating query interface

Country Status (1)

Country Link
CN (1) CN104615602B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776644B (en) * 2015-11-24 2019-11-29 大唐软件技术股份有限公司 A kind of reporting system configuration method and device
CN106776638A (en) * 2015-11-24 2017-05-31 大唐软件技术股份有限公司 Database operation method and device
CN106815271B (en) * 2015-12-02 2020-11-06 北京国双科技有限公司 Query condition generation method and device
CN105824637B (en) * 2016-03-17 2019-03-12 中国银行股份有限公司 Method for inquiring customization and system
CN106874321B (en) * 2016-06-24 2020-04-21 阿里巴巴集团控股有限公司 Pluggable data retrieval method and device
CN107665228B (en) * 2017-05-10 2019-12-20 平安科技(深圳)有限公司 Associated information query method, terminal and equipment
CN109614098A (en) * 2017-09-30 2019-04-12 北京国双科技有限公司 The generation method and device of configuration interface
CN108984623B (en) * 2018-06-14 2020-11-03 东软集团股份有限公司 Data query condition generation method and device, storage medium and electronic equipment
CN115455027A (en) * 2022-08-12 2022-12-09 中国第一汽车股份有限公司 A query method for the design form of non-standard mechanism of side wall mold

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806241A (en) * 2003-06-13 2006-07-19 微软公司 Database query user interface
CN102110161A (en) * 2011-02-24 2011-06-29 中兴通讯股份有限公司 Method and device for backing up and recovering multi-service database
CN102855250A (en) * 2011-06-30 2013-01-02 北京新媒传信科技有限公司 Method and system for display output of user information
CN103365646A (en) * 2012-04-11 2013-10-23 怡丰联合(北京)科技有限责任公司 Form user-defined, logical definition and processing method based on script engine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9529842B2 (en) * 2009-12-28 2016-12-27 International Business Machines Corporation Dynamically creating queries to find related records in a database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806241A (en) * 2003-06-13 2006-07-19 微软公司 Database query user interface
CN102110161A (en) * 2011-02-24 2011-06-29 中兴通讯股份有限公司 Method and device for backing up and recovering multi-service database
CN102855250A (en) * 2011-06-30 2013-01-02 北京新媒传信科技有限公司 Method and system for display output of user information
CN103365646A (en) * 2012-04-11 2013-10-23 怡丰联合(北京)科技有限责任公司 Form user-defined, logical definition and processing method based on script engine

Also Published As

Publication number Publication date
CN104615602A (en) 2015-05-13

Similar Documents

Publication Publication Date Title
CN104615602B (en) Device and method for automatically generating query interface
US11106816B2 (en) Database public interface
KR101665152B1 (en) Extending collaboration capabilities to external data
CN109033260B (en) Interactive visualization query method of knowledge graph based on RDF
US9448860B2 (en) Method and architecture for providing data-change alerts to external applications via a push service
RU2314559C2 (en) Method for representing user interface elements in simplified form
CN100580675C (en) Method and system for accessing disparate configuration management database repositories
US20060116999A1 (en) Sequential stepwise query condition building
JP2006012173A (en) Relationship management in data abstraction model
US20100088334A1 (en) Hierarchy manager for master data management
US7818328B2 (en) API for obtaining unambiguous representation of objects in a relational database
CN103577483B (en) The method and system of date storage method and system and data access
US20080288242A1 (en) System And Method Of Presentation of Multilingual Metadata
JP5192634B2 (en) Declaration order report parameterization
US20110252049A1 (en) Function execution using sql
US8972900B2 (en) Client-side generation and filtering of hierarchy information
CN112347277A (en) Menu generation method, apparatus, electronic device and readable storage medium
US20080263018A1 (en) Method and System for Mapping Business Objects to Relational Database Tables
US20200394055A1 (en) System and method for providing a configurable user interface using a self-describing data system
US20140143270A1 (en) Generating dynamic drilldown reports
KR101213798B1 (en) Complex data access
JP2006524376A (en) Generic database schema
CN101587437A (en) System and method for designing and generating tree control
US20140114916A1 (en) Code generation and implementation method, system, and storage medium for delivering bidirectional data aggregation and updates
US6934701B1 (en) Using a stored procedure to access index configuration data in a remote database management system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518057 Energy Storage Building, 3099 South Keyuan Road, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: SHENZHEN ZNV TECHNOLOGY Co.,Ltd.

Address before: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, South Road, building W1-A, the first floor of the building, building two

Applicant before: SHENZHEN ZNV TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190920

CF01 Termination of patent right due to non-payment of annual fee