CN101206654A - Database inquiry system and method having intelligent inquiry capability - Google Patents

Database inquiry system and method having intelligent inquiry capability Download PDF

Info

Publication number
CN101206654A
CN101206654A CNA2006101707922A CN200610170792A CN101206654A CN 101206654 A CN101206654 A CN 101206654A CN A2006101707922 A CNA2006101707922 A CN A2006101707922A CN 200610170792 A CN200610170792 A CN 200610170792A CN 101206654 A CN101206654 A CN 101206654A
Authority
CN
China
Prior art keywords
query
database
query statement
inquiry
inquire
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.)
Granted
Application number
CNA2006101707922A
Other languages
Chinese (zh)
Other versions
CN101206654B (en
Inventor
邱全成
叶建华
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2006101707922A priority Critical patent/CN101206654B/en
Publication of CN101206654A publication Critical patent/CN101206654A/en
Application granted granted Critical
Publication of CN101206654B publication Critical patent/CN101206654B/en
Expired - Fee Related 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 database query system with the intelligence query ability and a method. The system provided by the invention comprises an intelligence memory vault, a database and an analysis query module. After a user inputs query objects, firstly the intelligence memory vault searches whether a corresponding query exists; if such a query exists, the database is searched to find out the query, if such a query does not exist, the query objects are sent to the analysis query module to generate a plurality of queries and the database is inquired to calculate the scores of corresponding query compositions so as to find out the query with little query cost which is recorded in the intelligence memory vault. Afterwards, if the user inquires again with the same query object, the query can be automatically chosen to inquire data, which avoids the decreased query benefits of the database due to the usage of the query with worse benefits to inquire the database.

Description

The database inquiry system and the method for tool intelligence inquire ability
Technical field
The present invention relates to a kind of database inquiry system and method, relate in particular to a kind of tool intelligence inquire ability, can produce the database inquiry system and the method for the pairing inquiry combination of query object of input automatically.
Background technology
Along with computing machine utilization universalness, the record of data transfers to and is recorded in electronic media (or file) by being recorded in the Hard copy file gradually, and Various types of data can be recorded in these electronic medias (or file) and converge the whole database that is.The most normal function of using of lane database is data query, and the user can for example inquire about with the SQL instruction, and capture the data that are associated by database by assigning query statement.For instance, with the survey data, comprise that testee's sex, age, hobby, the income and the number of times of seeing a film weekly etc. are stored in the database.The user is as if wondering the film market of age level greater than 20 years old, can learn by assigning simple query statement, for example: Select Movie_Times_Week From Survey--_Inf where age>20, and the user also can be by instructing and computing than complicated query, learn the potential film market total value of above-mentioned age level, the user for example can assign: Select SUM (ICOME) From Survey_Inf where age>20 are taken in total value to learn age level the testee more than 20 years old, and for example assign: SelectSUM (Movie_Times_Week) From Survey_Inf where age>20 learn that age level watches the total degree of film weekly the testee more than 20 years old, and the testee more than 20 years old that will inquire about takes in total value and cuts the amount of money that total degree spent of watching film weekly, and just can obtain above-mentioned potential film market total value.
Yet, desire is brought into play the function of database incisively and vividly, the good and the bad that often depends on the query statement of assigning, and the good and the bad of query statement depends on the understanding of user to database (for example field meaning), and the complexity of the query statement of assigning, for example may be time-consuming with a plurality of better simply SQL instruction acquisition datas with complicated SQL instruction acquisition data, therefore complicated SQL just can be regarded as second-rate query statement.This shows that the manual operation factor may force in the usefulness of collecting with the data of management database and have a greatly reduced quality, and therefore needs a kind of database inquiry system and method that is independent of manual operation, avoid and improve above-mentioned disappearance.
Summary of the invention
Technical matters to be solved by this invention is can produce automatically behind the input inquiry object corresponding query statement, in order in the data base querying data.
For achieving the above object, the present invention reaches by System and method for two aspects, and the disclosed system of the present invention includes: an intelligent memory storehouse, in order to store a plurality of query objects and corresponding query statement thereof; A database is inquired about for the user in order to storage data; And an analysis and consult module, make up in order to the object that produces these query object correspondences, and produce corresponding query statement, thereby export a result set to inquire about this database according to a search algorithm.Wherein, above-mentioned analysis and consult module is more calculated the inquiry composite score of these query statement correspondences, and the query statement of the minimum inquiry composite score correspondence of record is in the intelligent memory storehouse, and will accumulate a result set by the output of database.
The data base query method of the disclosed tool intelligence inquire of the present invention ability includes the following step: at first import at least one query object, to inquire about corresponding at least one query statement; Afterwards, if judge that corresponding query statement is arranged, then according to these query statement Query Databases, to export a result set; Then,, then produce several object combinations, and produce the corresponding query statement of these object combinations in order to Query Database according to a search algorithm according to these query objects if judge do not have corresponding query statement; Then calculate a plurality of inquiry composite scores of these query statement correspondences according to the output of this database; At last, find out minimum inquiry composite score, and write down the query statement of this inquiry composite score correspondence, and the result set of this query statement correspondence of output.
By said system and method as can be known, the present invention is by producing the query statement of query object correspondence, and calculate and write down the less query statement of inquiry cost of these query statement correspondences, and when inquiring about with identical query object backward, be able to take out corresponding query statement automatically and come data query, when avoiding the manual operation database, assign relatively poor benefit or wrong query statement and reduce the utilization benefit of Database Systems.
About detailed features of the present invention and real the work, now cooperate to be shown in the embodiment and be described in detail as follows, its content is enough to make those skilled in the art to understand technology contents of the present invention and implements according to this, and according to the disclosed content of this instructions and graphic, any those skilled in the art can understand purpose and the advantage that the present invention is correlated with easily.
Description of drawings
The database inquiry system synoptic diagram that Fig. 1 carries for the embodiment of the invention;
The data base query method process flow diagram that Fig. 2 carries for the embodiment of the invention.
Wherein, Reference numeral:
110: the intelligent memory storehouse
120: database
130: the analysis and consult module
132: inquiry calculation module
134: the end value comparing module
Embodiment
For allow above-mentioned and other purpose of the present invention, feature and advantage can be more apparent and understandable, cited below particularlyly goes out an embodiment, and cooperates appended graphicly, be described in detail below.
The database inquiry system synoptic diagram that Fig. 1 carries for the embodiment of the invention.Please refer to Fig. 1, the database inquiry system of present embodiment (abbreviation system later on) comprises that an intelligent memory storehouse 110 is used for storing the query object of input and the query statement of these query object correspondences; A database 120 is used for storage data to inquire about for the user; An analysis and consult module 130 is used for producing the object combination of query object correspondence, and produces corresponding query statement according to an algorithm, and inquires a result set with these query statements at database 120.In addition, analysis and consult module 130 can calculate corresponding inquiry composite score according to member's number of the result set of required time of each query statement inquiry and passback.The cost of these query statement Query Databases 120 is used in these inquiry composite score representatives.Analysis and consult module 130 can find out these the inquiry composite scores in minimum value (in the present embodiment, there is less inquiry composite score to represent corresponding query statement to inquire more accurate data) with the short time, and the pairing query object of inquiry composite score of this minimum and query statement be stored in the middle of the intelligent memory storehouse, and the user is given in the result set output that inquires.
The preceding paragraph that continues falls, and also comprises an inquiry calculation module 132 and a comparing module 134 in the above-mentioned analysis and consult module 130.Inquiry calculation module 132 is deposited the algorithm of the multiple query statement that calculates the query object correspondence, inquiry calculation module 132 can produce some objects combinations according to the relation of query object by this algorithm, with further according to the query statement of these object combination results correspondences.When analysis and consult module 130 several query statements of generation, and to obtain Query Result behind these query statement Query Databases 120, analysis and consult module 130 can accumulate a result set with these Query Results.At this moment, 134 of comparing module can and produce these results and required time produces corresponding inquiry composite score according to member's number of these result sets, and further judge minimum an inquiry composite score and corresponding query statement thereof, in order to this query statement is recorded in intelligent memory storehouse 110.When the user imported identical query object next time, system did not just need to produce once more corresponding query statement, come data query and can directly extract query statement by the intelligent memory storehouse.
Subsidiary one carries, the intelligent memory storehouse 110 of native system can for example be that a hard disk or a flash memory etc. can be in order to store the media of query object and corresponding query statement, and query statement in the present embodiment, for example be a kind of Structured Query Language (SQL) instruction (Structured Query Language, SQL), any those skilled in the art is when can not limiting its scope at this according to the teaching correct of present embodiment.
The data base query method process flow diagram that Fig. 2 carries for the embodiment of the invention.Please refer to Fig. 2, the data base query method of present embodiment comprises the steps: at first, import at least one query object (step 210), these query objects for example are not to use that the person desires to assign chooses object and scope, rather than for example data base querying instruction such as SQL; At this moment, system can judge whether to have the query statement of these query object correspondences, query statement for example is SQL or other query statement in order to Query Database, if judge and have several corresponding query statements, then inquire about this database, to export a result set (step 220) according to these query statements; If judge and do not have a query statement of correspondence, then produce several objects combinations, and produce the corresponding query statement of these objects combinations in order to Query Database (step 230) according to a search algorithm according to these query objects; Then, calculate the inquiry composite score (step 240) of these query statement correspondences according to the data of database output; At last, find out minimum inquiry composite score, and write down the query statement of this inquiry composite score correspondence, and the result set (step 250) of output query statement correspondence.
Search algorithm in the present embodiment is to produce object combination and corresponding query statement thereof according at least one query object of input with the relation of Database field, and it comprises that step is as follows: whether the database of at first seeking system comprises the query object of input; If judge not comprise these query objects fully, then export an error message, for example: database does not comprise the data that your desire is sought, and please imports once more.Comprise at least one query object if judge, then according to these query objects several forms of database relevance produce the arrangement of object combination, for example import three query objects such as A, B, C according to the form number of relevance respectively do for oneself 5 forms, 1 form, 1 form, this moment, the object combination for example was ABC, representative is just inquired about according to relevance, the relevant information of inquiry A object is inquired about the B object more earlier, inquires about the C object afterwards again; At last, according to the query statement of these object combination results correspondences.
Hold above-mentioned, system is the automatic Query Database of each query statement to produce respectively, and will by database search to the result compile result set for each query statement correspondence, the field that result set comprises is query object field, query statement field, required time field, member's field etc. as a result for example, in order to the project of clear expression user inquiry, several query statements that system produces, search the database required time and by database search to data.In addition, system more can calculate the inquiry composite score of mentioning in step 240.The quality of assigning query statement depend on query time and the data found out what, generally speaking, the user wishes to find out accurate data with the short more time, and accurate more when the query statement that assign, the member's as a result who is found number is few more certainly.For instance, desire is sought the price information of teas drink in merchandising database, if single data of asking as receipts with drink, the number of then finding out of member as a result is too various, even may search the price data of soda.If with teas drink, PET bottle packing and selling spot as queried for items, though find information more accurate, yet increase the time of searching database.The inquiry composite score is exactly the quality that is used for representing with a query statement Query Database, and its account form adds up for the number of member as a result with result set adds the spent time of Query Database.Each query statement all has corresponding inquiry composite score, and the quality of the query statement of less in the present embodiment inquiry composite score correspondence is high more, and the quality of the bigger pairing query statement of inquiry composite score is low more.Comparing module in the analysis and consult module of system can be selected the pairing query statement of minimum inquiry composite score as preferable query statement, and is recorded in the intelligent memory storehouse.
In sum, the present invention stores the query statement of the preferable inquiry quality of tool because of adopting the intelligent memory storehouse, and produce several query statements of query object correspondence automatically and input database inquiry and judge the query statement of the preferable inquiry quality of tool by the analysis and consult module, and then stored, and have following advantage at least:
(1) user only needs the input inquiry project can produce query language automatically.
(2) do not need the form or the field of database are understood in depth, can operate.
(3) system produces the query statement of the higher inquiry quality of tool automatically, avoids using the query statement Query Database of relatively poor benefit and the inquiry benefit that reduces database.
Certainly the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; being familiar with those of ordinary skill in the art ought can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.

Claims (8)

1. the database inquiry system of a tool intelligence inquire ability, the pairing at least one query statement of at least one query object that is applicable to automatic generation input is characterized in that in order to data query this database inquiry system comprises:
One intelligent memory storehouse is in order to store those query objects and those corresponding query statements thereof;
One database is inquired about for the user in order to storage data; And
One analysis and consult module makes up in order to those objects that produce those query object correspondences, and produces those corresponding query statements according to a search algorithm, exports a result set to inquire about this database;
This analysis and consult module is also calculated an inquiry composite score of this query statement correspondence, and this query statement of this inquiry composite score correspondence of record minimum reaches this result set of output in this intelligent memory storehouse.
2. the database inquiry system of tool intelligence inquire ability according to claim 1 is characterized in that, this analysis and consult module also comprises:
One inquiry calculation module produces this object combination in order to the relation according to this query object, and produces this corresponding query statement of this object combination; And
One comparing module is provided this query statement of minimum this inquiry composite score correspondence in order to judgement.
3. the database inquiry system of tool intelligence inquire ability according to claim 1 is characterized in that, this intelligent memory storehouse is a hard disk or a flash memory.
4. the database inquiry system of tool intelligence inquire ability according to claim 1 is characterized in that, this query statement is Structured Query Language (SQL) instruction.
5. the data base query method of a tool intelligence inquire ability, the pairing at least one query statement of at least one query object that is applicable to automatic generation input is to be used for it is characterized in that in data base querying data this data base query method may further comprise the steps:
Import at least one query object;
Judge to have this corresponding query statement, then inquire about this database, to export a result set according to this query statement;
Judge do not have this corresponding query statement, then produce several object combinations, and produce this corresponding query statement of this object combination in order to inquire about this database according to a search algorithm according to this query object;
Calculate an inquiry composite score of this query statement correspondence according to the output of this database; And
Find out this minimum inquiry composite score, and write down this query statement of this inquiry composite score correspondence, and this result set of this query statement correspondence of output.
6. the data base query method of tool intelligence inquire ability according to claim 1 is characterized in that, this search algorithm may further comprise the steps:
Seek this query object whether this database comprises input;
Judge not comprise this query object fully, then export an error message;
Judge to comprise at least one this query object, then produce the arrangement of this object combination in the relevance of several forms of this database according to this object; And
Produce this corresponding query statement of this object combination.
7. the data base query method of tool intelligence inquire ability according to claim 1 is characterized in that, the member's as a result that this inquiry composite score is this result set the number and the totalling of query time.
8. the data base query method of tool intelligence inquire ability according to claim 1 is characterized in that, the field of this result set comprises a query object field, a query statement field, a required time field, member's field as a result.
CN2006101707922A 2006-12-22 2006-12-22 Database inquiry system and method having intelligent inquiry capability Expired - Fee Related CN101206654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101707922A CN101206654B (en) 2006-12-22 2006-12-22 Database inquiry system and method having intelligent inquiry capability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101707922A CN101206654B (en) 2006-12-22 2006-12-22 Database inquiry system and method having intelligent inquiry capability

Publications (2)

Publication Number Publication Date
CN101206654A true CN101206654A (en) 2008-06-25
CN101206654B CN101206654B (en) 2010-04-14

Family

ID=39566862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101707922A Expired - Fee Related CN101206654B (en) 2006-12-22 2006-12-22 Database inquiry system and method having intelligent inquiry capability

Country Status (1)

Country Link
CN (1) CN101206654B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010097000A1 (en) * 2009-02-27 2010-09-02 中兴通讯股份有限公司 Expert system for preprocessing work orders and method for preprocessing work orders
CN102479223A (en) * 2010-11-25 2012-05-30 中国移动通信集团浙江有限公司 Data query method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5924089A (en) * 1996-09-03 1999-07-13 International Business Machines Corporation Natural language translation of an SQL query
CN1484174A (en) * 2002-09-21 2004-03-24 鸿富锦精密工业(深圳)有限公司 Universal inquiry statement dynamic generation system and method
CN100357941C (en) * 2003-11-20 2007-12-26 鸿富锦精密工业(深圳)有限公司 Product type recording intelligent searching system and method
CN100485666C (en) * 2004-04-29 2009-05-06 Nec软件有限公司 Structured natural language inquiry and knowledge system
CN100464329C (en) * 2005-06-14 2009-02-25 联想(北京)有限公司 Construction method for dynamic structured query language statement

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010097000A1 (en) * 2009-02-27 2010-09-02 中兴通讯股份有限公司 Expert system for preprocessing work orders and method for preprocessing work orders
CN102479223A (en) * 2010-11-25 2012-05-30 中国移动通信集团浙江有限公司 Data query method and system
CN102479223B (en) * 2010-11-25 2014-06-04 中国移动通信集团浙江有限公司 Data query method and system

Also Published As

Publication number Publication date
CN101206654B (en) 2010-04-14

Similar Documents

Publication Publication Date Title
US7805439B2 (en) Method and apparatus for selecting data records from versioned data
US7257574B2 (en) Navigational learning in a structured transaction processing system
CN106663104B (en) Learning and using contextual content retrieval rules for query disambiguation
CN104123374B (en) The method and device of aggregate query in distributed data base
US20100228744A1 (en) Intelligent enhancement of a search result snippet
US20210117414A1 (en) Global dictionary for database management systems
CN100465953C (en) Iterative data analysis process via query result augmentation and result data feedback
CN104951468A (en) Data searching and processing method and system
CN102567329B (en) Data query method and data query system
RU2004109570A (en) COMPUTER SEARCH USING ASSOCIATIVE RELATIONS
CN101297291A (en) Suggesting and refining user input based on original user input
CN102279851A (en) Intelligent navigation method, device and system
CN104182405A (en) Method and device for connection query
US20130086071A1 (en) Augmenting search with association information
CN107577749A (en) A kind of management method of supplier
JP2019040598A5 (en)
US20140089340A1 (en) Method and apparatus for graphic code database updates and search
CN102693320A (en) Searching method and device
CN109815311B (en) Point reading method and system capable of identifying common books
CN104077392A (en) Method and device for searching suggestion prompting
CN101963993B (en) Method for fast searching database sheet table record
CN101206654B (en) Database inquiry system and method having intelligent inquiry capability
CN106649879A (en) Method for intelligent recommendation of professional book in library
US11341141B2 (en) Search system using multiple search streams
CN101493824A (en) Data retrieval method and device for database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Guo Hongjie

Inventor after: Wang Huichao

Inventor after: Cong Rong

Inventor after: Chen Zhaojin

Inventor after: Li Juan

Inventor before: Qiu Quancheng

Inventor before: Ye Jianhua

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171017

Address after: The 4 District of Hebei city of Langfang province Guangyang District Pipeline Bureau 28 Building 2 unit 502

Co-patentee after: Wang Huichao

Patentee after: Guo Hongjie

Co-patentee after: Cong Rong

Co-patentee after: Chen Zhaojin

Co-patentee after: Li Juan

Address before: Taipei City, Taiwan, China

Patentee before: Inventec Corporation

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

Granted publication date: 20100414

Termination date: 20171222