CN102541529B - A kind of query page generating device and method - Google Patents

A kind of query page generating device and method Download PDF

Info

Publication number
CN102541529B
CN102541529B CN201010615211.8A CN201010615211A CN102541529B CN 102541529 B CN102541529 B CN 102541529B CN 201010615211 A CN201010615211 A CN 201010615211A CN 102541529 B CN102541529 B CN 102541529B
Authority
CN
China
Prior art keywords
query
field
condition
information
name
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.)
Active
Application number
CN201010615211.8A
Other languages
Chinese (zh)
Other versions
CN102541529A (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.)
Bright Oceans Inter Telecom Co Ltd
Original Assignee
BEIJING BOCO INTER-TELECOM TECHNOLOGY Co Ltd
Bright Oceans Inter Telecom Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING BOCO INTER-TELECOM TECHNOLOGY Co Ltd, Bright Oceans Inter Telecom Co Ltd filed Critical BEIJING BOCO INTER-TELECOM TECHNOLOGY Co Ltd
Priority to CN201010615211.8A priority Critical patent/CN102541529B/en
Publication of CN102541529A publication Critical patent/CN102541529A/en
Application granted granted Critical
Publication of CN102541529B publication Critical patent/CN102541529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of query page generating device and method, comprise data capture unit, for obtaining store name information and the memory word segment information of target data; Query object storage unit, for storing respectively the store name information of described target data and memory word segment information; Condition dispensing unit, for according to actual queries demand, configuration querying field, query logic between condition field and condition field; Instance storage element, preserves into query case by described querying condition; Query page generation unit, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element.Can inquire about for different target datas and different query demands, when changing appears in query demand, only need to reconfigure query statement, or input new querying condition can complete inquiry according to the query page generated, do not need to carry out complicated coding change, reach the object of software reuse.

Description

A kind of query page generating device and method
Technical field
The present invention relates to computer information processing field, the technology of particularly a kind of comprehensive inquiry.
Background technology
In today of rapid development of information technology, each software vendor in order to stand firm in keen competition, fall over each other to develop new business support software systems in order to provide new business service, therefore create much different target datas, these target datas are kept in respective software systems respectively mainly with the mode of single table or view greatly.Because target data is numerous, the user of each software systems creates more inquiry, statistical demand to these target datas, is convenient to better use these operation systems, provides all kinds of form and statistics.The software of query function will be developed at present, all will through the complicated process such as demand analysis, Code Design, coding, test, issue scene, field deployment, construction cycle length, complex steps, require that technical threshold is high, realize style disunity, later maintenance cost is high, reuse difficulty.
Because target data kind is different, its address be saved, mode and structure are not identical yet, therefore the main realization rate of present query software, only be all for specific target data, according to the query demand that user proposes, develop one specially for the specific query interface of specific objective data by developer, carry out the query composition of various condition for user, if the demand change of user, then must have developer to modify to adapt to final query demand to program.
This traditional exploitation for specific objective data query software, the cycle is very long, and after succeeding in developing, other target data inquiry often can not be carried out multiplexing.Whenever there is new business demand, all to carry out R & D design and coding for this target data, comprise the inquiry code on foreground and the service logic inquiry code on backstage, therefore the inquiry mode that the simple specific aim of this function is very strong, for the query demand that existing plurality of target data coexist, existing software inquiry also exists communication process length, construction cycle length, revises dumb and can not be multiplexing problem.
Summary of the invention
The object of this invention is to provide a kind of generating apparatus of query page, can inquire about for different target datas and different query demands, when changing appears in query demand, only need to reconfigure query statement, or input new querying condition can complete inquiry according to the query page generated, do not need to carry out complicated coding change, reach the object of software reuse.
The technical solution used in the present invention is as follows:
A kind of query page generating device, described device comprises:
Data capture unit, for obtaining store name information and the memory word segment information of target data;
Query object storage unit, for according to pre-set query object storage organization, is stored respectively by the store name information of the described target data obtained by described data capture unit and memory word segment information;
Condition dispensing unit, for according to actual queries demand, the field information of described query object cell stores is configured to respectively inquiry field and condition field, and the query logic of configuration condition interfield, form complete querying condition, can be configured to query interface in described condition field, the content identified described by this condition field can be changed;
Instance storage element, by the querying condition of described condition dispensing unit configuration, preserves into query case according to the sequence of positions of configuration in pre-set query case storage organization;
Query page generation unit, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element.
The described occurrence being configured to the condition field of query interface, identifies with wild symbol when storing.
Preferably, described device also comprises:
Human-computer interaction interface, for making described data capture unit by described human-computer interaction interface typing, the store name information importing described target data and target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and present described query page generation unit generate query page for inquire about.
Further, described query object storage unit specifically comprises:
Object oriented memory module, claims and/or view name for all table names storing the storage target data that described data capture unit obtains;
Object field memory module, for storing the literary name name section of storage target data that described data capture unit obtains, attribute information and/or view field name, attribute information;
Described object oriented memory module and described object field memory module are claimed by table name and/or view name associates.
Concrete, described instance storage element comprises further:
Example information memory module, is stored as query case for the querying condition configured by described condition dispensing unit, and preserves title and the attribute information of described query case;
Instance field memory module, for storing the field attribute information of query case that described example information memory module stores, comprising field name, whether this field be inquiry field, whether this field be condition field, for being set to the condition field allocation position numbering of query interface.
Preferably, the query case that described query page generation unit stores according to described example information memory module, obtains all condition fields being set to query interface in this query case, according to the condition field obtained, and the generated query page.
Preferably, described device also comprises:
Query case release unit, the query case for being stored by described instance storage element is distributed to other users.
The invention also discloses a kind of query page generation method, described method comprises:
Obtain store name information and the memory word segment information of target data;
According to pre-set query object storage organization, the target data store name information of described acquisition and memory word segment information are stored respectively;
According to actual queries demand, the target data field of described storage is configured to respectively inquiry field and condition field, and the querying condition that the query logic of configuration condition interfield has formed, described condition field can be configured to query interface;
The querying condition of described configuration is saved as query case according to the sequence of positions of configuration in pre-set query case storage organization;
According to the condition field generated query page being configured to query interface in described query case.
Preferably,
Described condition field can be configured to query interface, identifies with wild symbol when storing.
Preferably, described method also comprises
By human-computer interaction interface typing, the store name information importing target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and presents the query page of described generation and inquires about according to the query page generated.
Further,
The target data store name information of described storage is storage list title and/or the view name of target data;
The target data memory word segment information of described storage is the memory word name section of target data, attribute information and/or view field name, attribute information.
Further,
The querying condition that described configuration completes is stored as query case, and preserves title and the attribute information of described query case;
Whether preserve the field attribute information of described query case, comprising field name, this field is inquiry field, and whether this field is condition field, whether this condition field is query interface, for being set to the condition field allocation position numbering of query interface.
Further,
According to the field information of described query case, obtain the condition field being set to query interface in described query case, according to the condition field obtained, the generated query page.
The invention also discloses a kind of using method of query page generating device, described method comprises:
Select list table and/or the view name of the storage target data needing inquiry;
According to list table and/or the view name of described selection, obtain its field name comprised and the querying condition formed according to the query logic of actual queries demand configuration querying field respectively, condition field and interfield, described condition field can be configured to query interface;
Occurrence according to inputting each field in the querying condition configured completes inquiry; Or, described querying condition is saved as query case, according to the query interface generated query page comprised in query case, in query page, inputs each field occurrence complete inquiry.
Preferably, described method also comprises:
The query case of described preservation is issued.
The invention also discloses a kind of query page generating device that uses and carry out the method for inquiring about, described method comprises:
According to query demand configuration querying condition in query page generating device, preserve query case, the generated query page, the occurrence inputting each field in query page completes inquiry;
Or select the query page meeting query demand in the query page generated, the occurrence inputting each field in query page completes inquiry.
The present invention only needs table or the view of any storage target data that user is paid close attention to, be linked in this device by the mode of importing, typing, by pre-entering the query case determined, complete acquisition target data, and query manipulation can be carried out according to query demand to the data of all accesses, overcome query software that in prior art, one is developed according to demand and can only write query statement for certain specific target data and carry out the defect of inquiring about; By target matrix/view and the field name of acquisition, user according to actual queries demand flexible configuration querying condition, can realize the different query demands of user for different target data; Query interface is set to by the condition field can changing key word of the inquiry, querying condition is saved as query case, according to the query case generated query page, user inputs different key words according to query demand in the query page generated, according to the query case preserved, the inquiry of different key word can be completed; Query demand as user is changed, and only need reconfigure querying condition and generate new query page, revises flexible and need not carry out a large amount of R&D works for new demand; By to the issue of preserving query case, achieve sharing of query case, user according to oneself available inquiry of query case screening of issuing, can further increase the extent for multiplexing to query manipulation.
Accompanying drawing explanation
Fig. 1 is the structural representation of the embodiment of the present invention one;
Fig. 2 is the schematic diagram of the mode configuration querying condition of the embodiment of the present invention one explanation configuration interface;
Fig. 3 is the structural representation of the embodiment of the present invention two description object storage unit;
Fig. 4 is the structural representation of the embodiment of the present invention three illustrated example storage unit;
Fig. 5 is the schematic flow sheet of a kind of query page of the present invention generation method;
Fig. 6 is the schematic flow sheet of the using method of a kind of query page generating device of the present invention;
Fig. 7 is the schematic flow sheet of the preferred using method of a kind of query page generating device of the present invention.
Embodiment
In order to enable those skilled in the art person understand the present invention program better, below in conjunction with drawings and embodiments, the present invention is described in further detail.
With reference to Fig. 1, it is the structural representation of a kind of query page generating device embodiment one of the present invention.
Data capture unit 11, for obtaining store name information and the memory word segment information of target data.
For various target data, all store in the mode of single table or view at present, therefore data capture unit obtains the method for data can be directly import the list table or view that store target data, obtain each field information in table/view name information and table/view, wherein the information of each field comprises field name, field type etc.
Query object storage unit 12, for according to pre-set query object storage organization, is stored respectively by the store name information of the described target data obtained by described data capture unit and memory word segment information.
The store name information of the target data obtained by data capture unit stores, and stores by the list table of all storage target datas or the title of view;
The memory word segment information of the target data obtained by data capture unit stores, field information by all fields comprised in each single table or view stores, field information comprises field name, field type, field represent type etc., as needs store other attributes, also store according to the actual requirements;
And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with this field information or view by major key with the major key of setting for the storage organization of preservation field information.
Condition dispensing unit 13, for according to actual queries demand, the target data field information of described query object cell stores is configured to respectively inquiry field and the condition field of query statement, and the query logic of configuration condition interfield, form complete querying condition, described condition field can be configured to query interface, and the content identified described by this condition field can be changed.
Preferably, be configured to the value of the condition field of query interface, store time can identify by asterisk wildcard, with represent its can for setting arbitrary value, asterisk wildcard can be "? ", " * ", " # ", the arbitrary symbol such as " & ".
The different querying condition that query demand and user need the Query Result of acquisition according to it and arrange, be made up of query aim data, querying condition data and query logic, when the field information of query object cell stores is configured to inquiry field, this field is query aim data, namely inquires about all data in this field; When the field information of query object cell stores is configured to condition field, this field is querying condition data, namely inquires about using this field as condition; Query logic generally comprises the operation rule that "AND", "or", " equaling ", " being greater than ", " being less than ", " being not equal to ", " being not more than ", " being not less than " etc. indicate, with the order of operation specified by bracket, further in order to make the result of inquiry more comprehensive, the arithmetic logic of fuzzy query can also be introduced, the number percent of given query result and querying condition coupling.
The mode of configuration querying condition can adopt the mode of configuration interface, namely on interface, present the table/view of query object cell stores, and the field information comprised in each table, by the mode configuration querying condition selected, also the mode of writing query statement can be selected, directly by describing mode configuration querying conditions such as SQL query statements.The form of query SQL is " SELECT query contents FROM table name WHERE querying condition ".
For the mode configuration querying condition of configuration interface, as shown in Figure 2, list table name in query object storage unit in query composition condition box and be called all field names comprised in the list table of " order ", be the field as query aim data that user selects in inquiry row frame, be specially " group's single time " and " application time "; Logic selection area lists alternative all arithmetic logics; The field as querying condition data that user selects and the arithmetic logic selected in condition row frame.
Can repeatedly be used flexibly to make the querying condition of configuration, query interface can be set to for the field as querying condition data, can change according to actual queries demand with the occurrence identifying this querying condition, when condition field " Pai Dan department " and " request slip quantity " are set to query interface, querying condition just becomes " (Pai Dan department=?) and (request slip quantity > ?) ", then SQL query condition is:
SELECT group single time, application time FROMtableorderWHERE (Pai Dan department=?) and (request slip quantity >?), the content that question mark is arranged can be replaced arbitrarily, " group's single time " and " application time " of other Pai Dan departments and other request slip quantity can be inquired about
When being specially " (Pai Dan department=Ministry of Construction) and (request slip quantity >10) " of specified requirements field, the implication of this querying condition configured is, searches work order " group's single time " and " application time " that department is greater than 10 for " Ministry of Construction " and " request slip quantity " in table order.
For the mode configuration querying condition of SQL, then SQL query condition is:
Select group single time, application time fromtableorderwhere (Pai Dan department=Ministry of Construction) and (request slip quantity >10), certainly in actual storage process, the single field such as time, application time of group in SQL query condition, all preserves and input with the English name of correspondence.
Instance storage element 14, by the querying condition of described condition dispensing unit configuration, preserves into query case according to the sequence of positions of configuration in pre-set query case storage organization, and gives Position Number respectively for the condition field being set to query interface.
The querying condition configured is saved as query case, is convenient to give occurrence according to query demand to the condition field being set to query interface in same queries condition, ensures that this querying condition is reused, and do not need to reconfigure.
It is a query case that each querying condition configured is saved, and according to arranging inquiry field during configuration querying condition and the order of condition field is preserved, and gives Position Number respectively for the condition field being set to query interface.
Query case storage organization for store all query cases, this query case for target data store single table or view name, querying condition that query case is corresponding, and field name involved by each query case and field attribute information, comprise whether this field is inquiry field, whether this field is condition field etc., and store separately the relevant information being set to the condition field of query interface, also can preserve according to the actual requirements if need to store other information.
Query page generation unit 15, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element.
Be configured to the condition field of query interface in query case, different querying conditions can be obtained by the different occurrences of query interface, reach the object of multiplexing querying condition.Therefore user can input arbitrary querying condition occurrence in the query page generated according to the query demand of oneself, then can inquire about according to the querying condition occurrence of the query logic in respective queries example and input, and need not again write querying condition statement.
During the generated query page, the all query interfaces comprised are obtained in this query case in query case storage organization, and this query case for target data store name after, can according to the query interface generated query page, present to user, user corresponding query interface position is filled in the condition keyword needing inquiry in query page, then can be inquired about the list table or view that store target data by query page.
In order to make this device better be operated by user and use, on the basis of embodiment one, this device can also comprise human-computer interaction interface 16, in order to carry out a series of inquiry, input, output services.
Human-computer interaction interface 16, for making described data capture unit by described human-computer interaction interface typing, the store name information importing described target data and target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and present described query page generation unit generate query page for inquire about.
Human-computer interaction interface makes this device to be operated and to use, wherein be provided with special typing, importing interface is supplied to data capture unit, the list table of target data be can will store or view access in this device easily, title and the field information wherein of single table or view obtained.
Human-computer interaction interface can arrange querying condition configuration interface, be connected with instance storage element with query object storage unit, on the surface, user can first select or input the list table or view name that need to carry out inquiring about, namely human-computer interaction interface lists by the storage content of query object storage unit all field names comprised in this list table or view, user is again according to actual queries demand configuration querying field on human-computer interaction interface, condition field (comprising the condition field being set to query interface) and query logic, also can direct input inquiry SQL statement, complete the layoutprocedure of querying condition, and in instance storage element, the querying condition configured is preserved into query case.
For configured but also do not preserve into the querying condition of query case, also can be inquired about accordingly by human-computer interaction interface.
Human-computer interaction interface is also connected with query page generation unit, present the query page that query page generation unit generates, user's corresponding Position input or select after occurrence in query page, can inquire about according to the occurrence of input the list table corresponding to this query page or view.
On the basis of embodiment one, in order to the storage organization of query object storage unit is better described, provide embodiments of the invention two, as shown in Figure 3, query object storage unit 12 comprises further:
Object oriented memory module 121, claims and/or view name for all table names storing the storage target data that described data capture unit obtains.
All table names that object oriented memory module stores data capture unit acquisition claim and/or view name, and its concrete storage organization is as shown in table 1
Table 1 object oriented storage organization (COMPLEX_QUERY_OBJECT)
Field name Describe Default value
OBJECT_ID Major key
OBJIECT_NAME Title The title of storage list or view
OBJECT_TYPE Object type 0-shows, 1-view
Such as: the table name singly show temp_order (order) when data capture unit 11 obtains, singly showing eva_temp_stat (comprehensive inquiry cutover) claims and field information, and then single table name is claimed to store in object oriented storage organization 121, store as shown in table 2 below, OBJECT_ID is the major key automatically generated.
Table 2 object oriented storage list
OBJECT_ID OBJIECT_NAME OBJECT_TYPE
400d0 temp_order 0
400d1 eva_temp_stat 0
Object field memory module 122, for storing the literary name name section of storage target data that described data capture unit obtains, attribute information and/or view field name, attribute information.
Multiple storage organization is comprised in object field memory module, storage organization is used for storing title and the information of all fields belonging to same single table or view, and each storage organization is associated by the external key OBJECT_ID list table corresponding to object oriented storage organization or view.As shown in table 3.
Table 3 object field storage organization (COMPLEX_QUERY_COLUMN)
Described object oriented memory module and described object field memory module are claimed by table name and/or view name associates.
Continue to use above-mentioned example, temp_order (order) is singly shown when data capture unit 11 obtains, the table name singly showing eva_temp_stat (comprehensive inquiry cutover) claims and field information, and then field information is stored in object field storage organization 122 stores, field SENDTIME (group's single time) is included in table temp_order, ISOVERSQTIME (application time), SENDDEPTID (Pai Dan department), SQNUM (request slip quantity), the fields such as SHEETTYPE (work order type), TASKCOMPLETELIMT (requiring feedback time) is comprised in table eva_temp_stat, DDUNM (scheduling odd number amount), TASKCOMPLETELIMIT (processing time), the fields such as DEPTID (industry number), storage mode is as shown in table 4 below, wherein COLUMN_ID is the major key that system generates automatically, OBJECT_ID is the external key of affiliated partner name storage table, can know which single table or view is which field belong to by the content in OBJECT_ID.
Table 4 object field storage list
COLUMN_ID COLUNM_NAME COLUMN_TYPE OBJECT_ID
a32010 SENDTIME 2 400d0
a32011 ISOVERSQTIME 2 400d0
a32012 SENDDEPTID 0 400d0
a32013 SQNUM 1 400d0
a32014 SHEETTYPE 0 400d0
b89007 TASKCOMPLETELIMT 2 400d1
b89008 DDUNM 1 400d1
b89009 TASKCOMPLETELIMIT 2 400d1
b89010 DEPTID 0 400d1
The list table of data acquisition or view name and field to be carried out point other to store, the access efficiency of whole system can be improved, thus improve the efficiency of inquiry.
On the basis of embodiment two, in order to the storage organization of better illustrated example storage unit, provide embodiments of the invention three, as shown in Figure 4, instance storage element 14 comprises further:
Example information memory module 141, is stored as query case for the querying condition configured by described condition dispensing unit, and preserves title and the attribute information of described query case.
All querying conditions that condition dispensing unit has configured by example information memory module all save as query case, store title and the attribute information of these query cases, it is a query case that a querying condition is saved, when there being new querying condition, need to preserve new query case, its storage organization is as shown in table 5, stored in Query Name in QUERY_NAME, Query Name is the unique identification of each query case, can be presented in human-computer interaction interface in order to the dominant query function that this query case completes to be described, given by user when querying condition being saved as query case, SELECT_COLUMNS is used for the inquiry field portions in the good querying condition of stored configuration, SQL_CONDITION is used for condition field in the good querying condition of stored configuration and query logic part, example is stored message structure and is connected with object oriented memory module as external key by OBJECT_ID, is the inquiry carried out which single table or view in order to describe each query case.Example information storage organization is as shown in table 5.
Table 5 example information storage organization (COMPLEX_QUERY)
KM_CONTENTS_ Describe Default value
QUERY_ID Example ID (major key)
QUERY_NAME Query Name
SELECT_COLUMNS Inquiry row name
SQL_CONDITION SQL condition
OBJECT_ID Query object (external key)
For condition dispensing unit " sending single information " querying condition to the configuration of temp_order table:
" Select group single time, and application time fromtableorderwhere (Pai Dan department=?) and (request slip quantity > ?) ", this querying condition is saved in example information storage list, as shown in table 6:
Table 6 example information storage list
If querying condition is all fixed value, then in the SQL_CONDITION field in example information storage list, be also stored as fixed value, such as querying condition is:
" Select group single time; application time fromtableorderwhere (Pai Dan department=Ministry of Construction) and (request slip quantity >10) ", then the storage in SQL_CONDITION field then becomes " (the SENDDEPTID=Ministry of Construction) and (SQNUM>10) "
Instance field memory module 142, for storing the field attribute information of the query case that described example information memory module stores, comprise field name, whether this field is inquiry field, whether this field is condition field, be set to the location number etc. of the condition field of query interface, because the condition field being only set to query interface just has location number, the occurrence of its location number according in example information storage organization SQL_CONDITION field store "? " position is determined, when after the condition field being set to query interface be first "? " time, then its location number is 1, the like.Whether therefore location number can being had to determine according to this field, whether this field is query interface, instance field storage organization is using COLUMN_ID as external key, associate with object field storage list, obtain the information of this field, and then which single table or view is this field known belong to, using QUERY_ID as external key, associate with example information table, this field can belong to which query case.As shown in table 7.
Table 7 instance field storage organization (COMPLEX_QUERY_COLUMN_INST)
Field name Describe Default value
COLUMN_INST_ID ID
IS_SELECT_COLUMN Whether be inquiry row names
IS_CONDITION_COLUMN Whether be condition row names
POSITION_NUM Location number
COLUMN_ID Field ID (external key)
QUERY_ID Inquiry ID (external key)
Same for above-mentioned " sending single information " querying condition, the instance field storing process of this query case is described, as shown in table 8 below: COLUMN_INST_ID is the Field ID number automatically generated, COLUMN_ID can be associated to object field storage list (table 4) as external key, QUERY_ID can be associated to example information storage list (table 6) as external key, these instance field known relate to the query case of " sending single information " in table 6, relate to a32010 (SENDTIME in table 4, group's single time), a32011, (ISOVERSQTIME, application time), a32011 (SENDDEPTID, Pai Dan department), a32011, (SQNUM, request slip quantity) field, according to the attribute information stored in table, group's single time, application time is inquiry field, Pai Dan department, request slip quantity is the condition field being set to query interface.
Table 8 instance field storage list
After completing above-mentioned a series of storage, the example id that described query page generation unit 15 stores according to described example information memory module 141, all condition fields being set to query interface in this query case are obtained in instance field memory module 142, according to the condition field obtained, generate with the query page of Query Name name.
Based on above-described embodiment, when user needs the generated query page, the example id that query page generation unit 15 stores according to example information memory module 141, if the QUERY_ID in table 6 is E5001, all field informations being set to query interface are obtained in table 8 instance field storage list, for Pai Dan department and request slip quantity, then according to these two field informations, generate corresponding query page, that can carry out " sending single information " querying condition repeats inquiry, in the query page generated, different Pai Dan departments and request slip quantity can be inputted, query page generation unit 15 is according to the Position Number of query interface, by in the occurrence substitution tables 6 of input in SQL_CONDITION field "? " and according to " sending single information " query case preserved, single table temp_order is inquired about, present the result of inquiry, avoid the workload repeating to write query SQL, improve efficiency.
The present invention also provides a kind of query page generation method, as shown in Figure 5, comprises the following steps:
Step S101: the store name information and the memory word segment information that obtain target data.
For various target data, all store in the mode of single table or view at present, therefore data capture unit obtains the method for data can be directly import the list table or view that store target data, obtain each field information in table/view name information and table/view, wherein the information of each field comprises field name, field type, field represent type etc.
Step S102: according to pre-set query object storage organization, stores respectively by the target data store name information of described acquisition and memory word segment information.
The store name information of target data is stored, stores by the list table of all storage target datas or the title of view;
Stored by the memory word segment information of target data, the field information by all fields comprised in each single table or view stores respectively as a storage unit, and field information comprises field name, field type, field represent type etc.;
And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with field information or view by major key with the major key of setting for the storage organization of preservation field information.
Step S103: according to actual queries demand, is configured to inquiry field and condition field respectively by the target data field of described storage, and the querying condition that the query logic of configuration condition interfield has formed, described condition field can be configured to query interface.
Preferably, be configured to the value of the condition field of query interface, store time can identify by asterisk wildcard, with represent its can for setting arbitrary value, asterisk wildcard can be "? ", " * ", " # ", the arbitrary symbol such as " & ".
The different querying condition that query demand and user need the Query Result of acquisition according to it and arrange, be made up of query aim data, querying condition data and query logic, when the field information of query object cell stores is configured to inquiry field, this field is query aim data, namely inquires about all data in this field; When the field information of query object cell stores is configured to condition field, this field is querying condition data, namely inquires about using this field as condition; Query logic generally comprises the operation rule that "AND", "or", " equaling ", " being greater than ", " being less than ", " being not equal to ", " being not more than ", " being not less than " etc. indicate, with the order of operation specified by bracket, further in order to make the result of inquiry more comprehensive, the arithmetic logic of fuzzy query can also be introduced, the number percent of given query result and querying condition coupling.
The mode of configuration condition can adopt the mode of configuration interface, namely on interface, present the table/view of query object cell stores, and the field information comprised in each table, by the mode configuration querying condition selected, also the mode of writing query statement can be selected, directly by describing mode configuration querying conditions such as query SQL.
Step S104: the querying condition of described configuration is saved as query case according to the sequence of positions of configuration in pre-set query case storage organization.
The querying condition configured is saved as query case, is convenient to give occurrence according to query demand to the condition field being set to query interface in same queries condition, ensures that this querying condition is reused, and do not need to reconfigure.
It is a query case that each querying condition configured is saved, and according to arranging inquiry field during configuration querying condition and the order of condition field is preserved, and gives Position Number respectively for the condition field being set to query interface.
Query case storage organization for store all query cases, this query case for target data store single table or view name, querying condition that query case is corresponding, and field name involved by each query case and field attribute information, comprise whether this field is inquiry field, whether this field is condition field etc., and store separately the relevant information being set to the condition field of query interface, also can preserve according to the actual requirements if need to store other information.
Step S105: according to the condition field generated query page being configured to query interface in described query case.
Namely can change its occurrence according to the condition field being configured to query interface in query case and reach the field of inquiring about multiplexing object, therefore user can input arbitrary querying condition occurrence in the query page generated according to the query demand of oneself, then can inquire about according to the querying condition occurrence of the query logic in respective queries example and input, and again need not write querying condition.
According to above step, according to Fig. 5, the step of preferred above-described embodiment four also comprises:
Step S106: by human-computer interaction interface typing, the store name information importing target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and presents the query page of described generation and inquires about according to the query page generated.
The principle of work of each step in this method, said apparatus part is similar all, please refer to corresponding description, does not repeat them here.
The invention still further relates to a kind of using method of query page generating device, as shown in Figure 6, it is characterized in that, described method comprises step:
Step S201: list table and/or the view name of selecting the storage target data needing inquiry.
The list table and/or the view that need inquiry is selected by human-computer interaction interface
Step S202: according to list table and/or the view name of described selection, obtain its field name comprised and the querying condition formed according to the query logic of actual queries demand configuration querying field respectively, condition field and interfield, described condition field can be configured to query interface.
After having selected, human-computer interaction interface is according to the storage content of query page generating device, present all field names of this list table or view further, user according to query demand configuration querying condition on human-computer interaction interface, can comprise the query logic of configuration querying field, condition field and interfield.
Described querying condition is saved as query case by S203.
By the save button that machine Interaction Interface Design is good, preserved by the querying condition configured, then query page generating device then can be preserved query case according to the storage organization designed.
S204, according to the query interface generated query page comprised in query case, inputs each field occurrence and completes inquiry in query page.
When the needs generated query page, button is generated by the query page clicked in human-computer interaction interface, the query page generation unit set out in query page generating device is according to the query interface generated query page comprised in query case, the occurrence of each field can be inputted in the query page generated, finally complete inquiry.
Preferably, step S203 and step S204 can be replaced with step S205 as shown in Figure 7 and directly complete inquiry.
S205 completes inquiry according to the occurrence inputting each field in the querying condition configured.
If do not need the generated query page, user also according to the querying condition of oneself configuration, directly inquire about single table or view, and the occurrence inputting each field can carry out inquiring about.
Preferably, after step S205, step S206 can also be comprised, in order to issue the example preserved.
S206: the query case of described preservation is issued.
The query case preserved being issued, mainly in order to make these query cases be employed more widely, saving the cost of research and development further.
Present invention also offers a kind of query page generating device that uses and carry out the method for inquiring about, when there is new query demand, user is by human-computer interaction interface configuration querying condition in query page generating device, and the querying condition configured is saved as query case, according to the query interface generated query page in query case, the occurrence of each field is inputted in query page, finally complete inquiry, and do not need to make any amendment to the program on backstage, greatly save the workload of inquiry, improve efficiency.Configuration querying condition, the process of preserving query case and the generated query page with above described in consistent, do not repeat them here.
When having saved multiple queries example in query page generating device, and when generating the multiple queries page, query page generating device will present query page list, user can select generated query page according to the query demand of oneself, in query page, input each field occurrence can inquire about, do not need the change of querying condition configuration and the code carried out, make inquiry become easier.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (14)

1. a query page generating device, is characterized in that, described device comprises:
Data capture unit, for obtaining store name information and the memory word segment information of target data;
Query object storage unit, for according to pre-set query object storage organization, the store name information of the described target data obtained by described data capture unit and memory word segment information are stored respectively, and set major key in the storage organization of described store name information; And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with this field information or view by major key with the major key of setting for the storage organization of preservation field information;
Condition dispensing unit, for according to actual queries demand, the field information of described query object cell stores is configured to respectively inquiry field and condition field, and the query logic of configuration condition interfield, form complete querying condition, described condition field can be configured to query interface, and the content identified described by this condition field can be changed;
Instance storage element, by the querying condition of described condition dispensing unit configuration, preserves into query case according to the sequence of positions of configuration in pre-set query case storage organization;
Query page generation unit, for being configured to the condition field generated query page of query interface in the query case that stores according to described instance storage element;
Described instance storage element comprises further:
Example information memory module, is stored as query case for the querying condition configured by described condition dispensing unit, and preserves title and the attribute information of described query case;
Instance field memory module, for storing the field attribute information of query case that described example information memory module stores, comprising field name, whether this field be inquiry field, whether this field be condition field, for being set to the condition field allocation position numbering of query interface.
2., according to the device described in claim 1, it is characterized in that:
The described occurrence being configured to the condition field of query interface, identifies with wild symbol when storing.
3. according to the device described in claim 1 or 2, it is characterized in that, also comprise:
Human-computer interaction interface, for making described data capture unit by described human-computer interaction interface typing, the store name information importing described target data and target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and present described query page generation unit generate query page for inquire about.
4. according to the device described in claim 3, it is characterized in that, described query object storage unit specifically comprises:
Object oriented memory module, claims and/or view name for all table names storing the storage target data that described data capture unit obtains;
Object field memory module, for storing the literary name name section of storage target data that described data capture unit obtains, attribute information and/or view field name, attribute information;
Described object oriented memory module and described object field memory module are claimed by table name and/or view name associates.
5. device according to claim 4, is characterized in that:
The query case that described query page generation unit stores according to described example information memory module, obtains all condition fields being set to query interface in this query case, according to the condition field obtained, and the generated query page.
6. device according to claim 5, is characterized in that, described device also comprises:
Query case release unit, the query case for being stored by described instance storage element is distributed to other users.
7. a query page generation method, is characterized in that, described method comprises:
Obtain store name information and the memory word segment information of target data;
According to pre-set query object storage organization, the target data store name information of described acquisition and memory word segment information are stored respectively, and set major key in the storage organization of described store name information; And preservation list shows or the storage organization of view name associates, to determine to find the list table corresponding with this field information or view by major key with the major key of setting for the storage organization of preservation field information;
According to actual queries demand, the target data field of described storage is configured to respectively inquiry field and condition field, and the querying condition that the query logic of configuration condition interfield has formed, described condition field can be configured to query interface;
The querying condition of described configuration is saved as query case according to the sequence of positions of configuration in pre-set query case storage organization; The querying condition configured is stored as query case, and preserves title and the attribute information of described query case; Storing the field attribute information of described query case, comprising whether field name, this field are inquiry field, whether this field is condition field, for being set to the condition field allocation position numbering of query interface;
According to the condition field generated query page being configured to query interface in described query case.
8. method according to claim 7, is characterized in that:
Described condition field can be configured to query interface, identifies with wild symbol when storing.
9. method according to claim 8, is characterized in that:
By human-computer interaction interface typing, the store name information importing target data and memory word segment information, configure described inquiry field, condition field and query logic, querying condition according to configuring is inquired about, and presents the query page of described generation and inquires about according to the query page generated.
10., according to the method described in claim 9, it is characterized in that:
The target data store name information of described storage is storage list title and/or the view name of target data;
The target data memory word segment information of described storage is the memory word name section of target data, attribute information and/or view field name, attribute information.
11., according to the method described in claim 10, is characterized in that:
According to the field information of described query case, obtain the condition field being set to query interface in described query case, according to the condition field obtained, the generated query page.
The using method of 12. 1 kinds of query page generating devices as claimed in claim 1, is characterized in that, described method comprises:
Select list table and/or the view name of the storage target data needing inquiry;
According to list table and/or the view name of described selection, obtain its field name comprised and the querying condition formed according to the query logic of actual queries demand configuration querying field respectively, condition field and interfield, described condition field can be configured to query interface;
Occurrence according to inputting each field in the querying condition configured completes inquiry; Or, described querying condition is saved as query case, according to the query interface generated query page comprised in query case, in query page, inputs each field occurrence complete inquiry.
13. methods according to claim 12, is characterized in that, described method also comprises:
The query case of described preservation is issued.
14. 1 kinds of methods using query page generating device as claimed in claim 1 to carry out inquiring about, it is characterized in that, described method comprises:
According to query demand configuration querying condition in query page generating device, preserve query case, the generated query page, the occurrence inputting each field in query page completes inquiry;
Or select the query page meeting query demand in the query page generated, the occurrence inputting each field in query page completes inquiry.
CN201010615211.8A 2010-12-30 2010-12-30 A kind of query page generating device and method Active CN102541529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010615211.8A CN102541529B (en) 2010-12-30 2010-12-30 A kind of query page generating device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010615211.8A CN102541529B (en) 2010-12-30 2010-12-30 A kind of query page generating device and method

Publications (2)

Publication Number Publication Date
CN102541529A CN102541529A (en) 2012-07-04
CN102541529B true CN102541529B (en) 2015-12-16

Family

ID=46348507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010615211.8A Active CN102541529B (en) 2010-12-30 2010-12-30 A kind of query page generating device and method

Country Status (1)

Country Link
CN (1) CN102541529B (en)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462361B (en) * 2014-12-05 2017-10-31 广州普邦园林股份有限公司 The method and apparatus of data in a kind of matched data table
CN105404501B (en) * 2015-09-24 2019-02-01 国网山东省电力公司 Analysis method and system of rule base based on SAP platform
CN105868225A (en) * 2015-11-18 2016-08-17 乐视体育文化产业发展(北京)有限公司 Data query method, client, server and system
CN106776644B (en) * 2015-11-24 2019-11-29 大唐软件技术股份有限公司 A kind of reporting system configuration method and device
CN105608122B (en) * 2015-12-15 2019-02-15 浪潮软件股份有限公司 A method and device for storing electronic form data
CN105589952A (en) * 2015-12-21 2016-05-18 成都科来软件有限公司 General network statistic data querying method and system
CN106682210B (en) * 2016-12-30 2020-12-04 广州华多网络科技有限公司 Log file query method and device
CN106951273A (en) * 2017-05-02 2017-07-14 山东浪潮通软信息科技有限公司 The method and apparatus that a kind of dynamic configuration generates professional workstation
CN107197024A (en) * 2017-06-09 2017-09-22 努比亚技术有限公司 Single table access and control method, user terminal, server and storage medium
CN109614098A (en) * 2017-09-30 2019-04-12 北京国双科技有限公司 The generation method and device of configuration interface
CN107908657A (en) * 2017-10-17 2018-04-13 平安科技(深圳)有限公司 Querying method, device, computer equipment and the storage medium of bordereau
CN107832395A (en) * 2017-10-30 2018-03-23 山东浪潮通软信息科技有限公司 A kind of data processing method, device, computer-readable recording medium and storage control
CN108053327B (en) * 2017-12-11 2020-11-17 泰康保险集团股份有限公司 Method and device for inquiring repayment net charge value
CN108446344A (en) * 2018-03-06 2018-08-24 政采云有限公司 Custom condition querying method and system
CN108710708A (en) * 2018-05-31 2018-10-26 泰康保险集团股份有限公司 Report processing method, device, medium and electronic equipment
CN109213506A (en) * 2018-08-24 2019-01-15 郑州云海信息技术有限公司 A kind of firmware information acquisition methods and relevant apparatus
CN109710790B (en) * 2018-11-19 2020-12-11 北京达佳互联信息技术有限公司 Expression searching method and device, terminal equipment and storage medium
CN110609841B (en) * 2019-09-18 2020-09-15 镁佳(北京)科技有限公司 Method, device, readable medium and electronic equipment for asynchronously processing messages
CN111708926B (en) * 2020-06-12 2023-06-13 北京思特奇信息技术股份有限公司 Method and system for realizing configuration of data query
CN112115338A (en) * 2020-09-15 2020-12-22 平安信托有限责任公司 Page query request processing method, device, equipment and storage medium
CN112434100A (en) * 2020-11-20 2021-03-02 航天信息股份有限公司企业服务分公司 Method and system for realizing dynamic display of columns and multiple conditions and dynamic multi-latitude query
CN113064917A (en) * 2021-03-08 2021-07-02 南京苏宁软件技术有限公司 Data query method and device, computer equipment and storage medium
CN113220714A (en) * 2021-05-29 2021-08-06 五八到家有限公司 Configurable data query platform and method, electronic equipment and readable medium
CN114416772B (en) * 2021-12-28 2025-12-05 北京百度网讯科技有限公司 A data query method, apparatus, electronic device, and storage medium
CN114461717A (en) * 2022-02-16 2022-05-10 中国平安人寿保险股份有限公司 Automatic data comparison method and device, electronic equipment and storage medium
CN115237467B (en) * 2022-08-10 2025-05-23 平安科技(深圳)有限公司 Page view configuration method, device, computer equipment and storage medium
CN118193567B (en) * 2024-03-07 2025-07-18 北京神舟航天软件技术股份有限公司 Method, device, equipment and medium for generating query statements and querying business data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588369A (en) * 2004-09-06 2005-03-02 杭州恒生电子股份有限公司 Relation type data base system and its search and report method
CN101021865A (en) * 2007-03-23 2007-08-22 上海汉光知识产权数据科技有限公司 Data search results displaying method and display system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4569682B2 (en) * 2008-07-22 2010-10-27 ソニー株式会社 Information processing device, terminal device, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588369A (en) * 2004-09-06 2005-03-02 杭州恒生电子股份有限公司 Relation type data base system and its search and report method
CN101021865A (en) * 2007-03-23 2007-08-22 上海汉光知识产权数据科技有限公司 Data search results displaying method and display system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一个基于模式的快速查询构建系统;泮海敏等;《计算机工程与设计》;20050131;第26卷(第1期);第174-176页 *

Also Published As

Publication number Publication date
CN102541529A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN102541529B (en) A kind of query page generating device and method
CN101876983B (en) Method for partitioning database and system thereof
CN101651576B (en) Alarm information processing method and system
CN101546311B (en) Data processing method and data processing device for recycle bin
CN104881466B (en) The processing of data fragmentation and the delet method of garbage files and device
CN110134681B (en) Data storage and query method and device, computer equipment and storage medium
CN101609473B (en) Method and device for reconstructing structured query language of report inquiry
CN102436473A (en) Menu management device and menu management method
CN112162731B (en) Data expansion method, device, storage medium and electronic device
CN110737747A (en) data operation method, device and system
CN107092701A (en) The data processing method and device of a kind of Multidimensional Data Model
CN111651453A (en) User historical behavior query method and device, electronic equipment and storage medium
JPH0773204A (en) Parallel table for data model with heritage
CN101477555B (en) Fast retrieval and generation display method for task tree based on SQL database
CN105117433A (en) Method and system for statistically querying HBase based on analysis performed by Hive on HFile
CN106599153A (en) Multi-data-source-based waste industry search system and method
CN106503274A (en) A kind of Data Integration and searching method and server
CN101369329A (en) Method and apparatus for associating documents in ERP system
CN104111994A (en) Label data screening method and device based on mixed data source
CN100507921C (en) Text display method and system in an embedded system
CN104714974A (en) Method and device for parsing and reprocessing query statement
CN103455335A (en) Multilevel classification Web implementation method
CN111782703A (en) Method and system for automatically managing and displaying incidence relation between irrigation area object data
CN115905628A (en) A dynamic resource directory construction method, device, equipment and storage medium
US20120078971A1 (en) Data management method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100093, Beijing, Haidian District, apricot Road, No. 99, block B

Applicant after: BEIJING BOCO INTER-TELECOM TECHNOLOGY Co.,Ltd.

Applicant after: BOCO INTER-TELECOM Co.,Ltd.

Address before: 100093, Beijing, Haidian District, apricot Road, No. 99, block B

Applicant before: BEIJING BOCO INTER-TELECOM SOFTWARE RESEARCH INSTITUTE Ltd.

Applicant before: BOCO INTER-TELECOM Co.,Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING YIYANG XINTONG SOFTWARE INST. CO., LTD. TO: BEIJING BRIGHT OCEAN XINTONG TECHNOLOGY CO., LTD.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20180726

Address after: 430000 room 603-04, Taihe square, 72 wusheng Road, Wuhan, Hubei.

Patentee after: Wuhan Science and Technology Ltd. of Bright Oceans Co.,Ltd.

Address before: No. 99 B, Xing Shi Kou Road, Haidian District, Beijing

Co-patentee before: BOCO INTER-TELECOM Co.,Ltd.

Patentee before: BEIJING BOCO INTER-TELECOM TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220922

Address after: 150090 Building 1, hi tech Development Zone, Songshan Road, Nangang District, Harbin, Heilongjiang

Patentee after: BOCO INTER-TELECOM Co.,Ltd.

Address before: 430000 room 603-04, Taihe square, 72 wusheng Road, Wuhan, Hubei.

Patentee before: Wuhan Science and Technology Ltd. of Bright Oceans Co.,Ltd.