CN105760380A - Database query method, device and system - Google Patents

Database query method, device and system Download PDF

Info

Publication number
CN105760380A
CN105760380A CN201410782436.0A CN201410782436A CN105760380A CN 105760380 A CN105760380 A CN 105760380A CN 201410782436 A CN201410782436 A CN 201410782436A CN 105760380 A CN105760380 A CN 105760380A
Authority
CN
China
Prior art keywords
text message
inquiry
text
unique mark
data base
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410782436.0A
Other languages
Chinese (zh)
Inventor
肖云江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410782436.0A priority Critical patent/CN105760380A/en
Publication of CN105760380A publication Critical patent/CN105760380A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

An embodiment of the invention provides a database query method, device and system. The database query method comprises the following steps: a query request containing more than one query keyword input by a user is received; a preset text library is queried according to the more than one query keyword, and at least one to-be-selected text message corresponding to the more than one query keyword is obtained; the preset text library is established on the basis of a data table in a database and contains more than one text message, and each text message comprises a unique identification of a record in the data table and information corresponding to the unique identification; at least one unique identification is obtained from the to-be-selected text messages; the database is queried according to the acquired unique identification, and the record information corresponding to the unique identification is acquired. Efficient and fast database query is realized in a relational database.

Description

Data base query method, Apparatus and system
Technical field
The present embodiments relate to computer technology, particularly relate to a kind of data base query method, Apparatus and system.
Background technology
Business operation support system, as telecommunications, bank, electric power, electricity business, affairs of household registration's management operation system, be all based on what relevant database was built, it will usually have the management of customer information, be also very general operation to the inquiry of customer information.Especially fuzzy query all can be used in a lot of scenes, by being scanned inquiring about various information to the full table in relevant database according to title or some Expressive Features, such as, the information of client is retrieved according to customer name, or search information of vehicles for latter several according to vehicle identification number, or paying tariff according to address, this is all that client is not when knowing complete key message, it is necessary to carry out fuzzy query according to other relevant informations of storage in data base.
But, the full table scan of fuzzy query is very time consuming, and when data volume reaches more than 10,000,000, the efficiency of fuzzy query is just non-normally low, and hardly possible when data volume reaches more than one hundred million grades obtains Query Result within the expected time.Visible, fuzzy query can badly influence the execution efficiency of operation system, even can cause that service response is interrupted because it consumes database resource excessively.
Summary of the invention
The embodiment of the present invention provides a kind of data base query method, Apparatus and system, to realize efficiently quickly data base querying in relational database.
First aspect, the embodiment of the present invention provides a kind of data base query method, including:
Receiving inquiry request, described inquiry request includes the more than one key word of the inquiry of user's input;
According to one above key word of the inquiry inquiry pre-set text storehouse, obtain at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;
From described text message to be selected, obtain at least one uniquely identify;
According to the unique mark inquiry data base obtained, obtain the record information corresponding with described unique mark.
In conjunction with first aspect, in the first possible implementation of first aspect, described from described text message to be selected, obtain at least one uniquely identify, including:
Receive and really select instruction, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user;
Obtain the described unique mark in the described described text message really selecting instruction to select.
In conjunction with first aspect, in the implementation that the second of first aspect is possible, described from described text message to be selected, obtain at least one uniquely identify, including:
Obtain the unique mark in every text message to be selected.
In conjunction with first aspect, first aspect the first to any one possible implementation in the second, in the third possible implementation of first aspect, before described reception inquiry request, also include:
Corresponding to unique mark of every record in tables of data, from the tables of data of described data base, select the information mated with preset rules, according to preset format, described information is formed text message;
Described pre-set text storehouse is set up with the text message of composition.
In conjunction with first aspect, first aspect the first to any one possible implementation in the third, in the 4th kind of possible implementation of first aspect, before described reception inquiry request, also include:
Interactive interface is provided to described user according to preset rules.
In conjunction with first aspect, first aspect the first to any one possible implementation in the third, in the 5th kind of possible implementation of first aspect, described method also includes:
When record in data base occurs to update, the text message in pre-set text storehouse described in synchronized update.
Second aspect, the embodiment of the present invention provides a kind of database inquiry device, including:
Receiver module, is used for receiving inquiry request, and described inquiry request includes the more than one key word of the inquiry of user's input;
Text query module, for according to one above key word of the inquiry inquiry pre-set text storehouse, obtaining at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;
Acquisition module, uniquely identifies for obtaining at least one from described text message to be selected;
Database query module, for according to the unique mark inquiry data base obtained, obtaining the record information corresponding with described unique mark.
In conjunction with second aspect, in the first possible implementation of second aspect, described acquisition module, really selects instruction specifically for receiving, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user;Obtain the described unique mark in the described described text message really selecting instruction to select.
In conjunction with second aspect, in the implementation that the second of second aspect is possible, described acquisition module, specifically for obtaining the unique mark in every text message to be selected.
In conjunction with second aspect, second aspect the first to any one possible implementation in the second, in the third possible implementation of second aspect, also include:
Text library sets up module, for corresponding to unique mark of every record in tables of data, selecting the information mated with preset rules, according to preset format, described information is formed text message from the tables of data of described data base;Described pre-set text storehouse is set up with the text message of composition.
In conjunction with second aspect, second aspect the first to any one possible implementation in the third, in the 4th kind of possible implementation of second aspect, also include:
Display module, for providing interactive interface according to preset rules to described user.
In conjunction with second aspect, second aspect the first to any one possible implementation in the third, in the 5th kind of possible implementation of second aspect, also include:
More new module, when occurring to update for the record in data base, the text message in pre-set text storehouse described in synchronized update.
The third aspect, the embodiment of the present invention provides a kind of database inquiry system, including:
Database inquiry device and data base;Wherein,
Described database inquiry device adopt second aspect, second aspect the first to the device described in any one possible implementation in the 5th kind;Described data base is for storing the tables of data including record information.
Embodiment of the present invention data base query method, Apparatus and system, by adopting text search to get unique mark, data base is accurately inquired about again through unique mark, realize efficiently quick data base querying, solve that the data base of mass data carries out fuzzy query and can badly influence the execution efficiency of operation system, even can cause the problem that service response is interrupted because it consumes database resource excessively.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structural representation of an embodiment of database inquiry system of the present invention;
Fig. 2 is the flow chart of an embodiment of data base query method of the present invention;
Fig. 3 is the structural representation of an embodiment of database inquiry device of the present invention;
Fig. 4 is the structural representation of another embodiment of database inquiry device of the present invention;
Fig. 5 is the structural representation of an embodiment of database inquiry facility of the present invention;
Fig. 6 is the structural representation of another embodiment of database inquiry system of the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Fig. 1 is the structural representation of an embodiment of database inquiry system of the present invention, as shown in Figure 1, the system of the present embodiment may include that database inquiry device 11, data base 12 and interactive device 13, wherein, database inquiry device 11, for providing the search engine carrying out text query and pre-set text storehouse;Data base 12, are used for storing all information;Interactive device 13, can the display interface of input and output for providing a user with.In the present invention, database inquiry device 11 can be an independent equipment entity, for instance text search server, it is also possible to be integrated in data base 12 as a functional module;Interactive device 13 can be independently of an other independent display device or the input-output equipment of database inquiry device 11 and data base 12, can also being display or the input/output unit of database inquiry device 11 or data base 12, interactive interface can be shown to user by interactive device 13 in the form of a web page.This present invention is not specifically limited.
Fig. 2 is the flow chart of an embodiment of data base query method of the present invention, as in figure 2 it is shown, the method for the present embodiment may include that
Step 101, reception inquiry request;
Described inquiry request includes the more than one key word of the inquiry of user's input;
The executive agent of the present embodiment can be the database inquiry device in database inquiry system shown in Fig. 1.User inputs more than one key word of the inquiry by interactive interface, for instance can be the name of user, sex and address, and these keys word of the inquiry composition inquiry request, database inquiry device carries out follow-up query manipulation according to this inquiry request.
Step 102, according to one above key word of the inquiry inquiry pre-set text storehouse, obtain at least one to be selected text message corresponding with the above key word of the inquiry of one;
Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark.
Present invention utilizes text search technology.For fuzzy query, it is possible to inquire about pre-set text storehouse by the key word of the inquiry of fuzzy query and obtain unique mark of the record in data base.Wherein, this pre-set text storehouse is based on what the tables of data in data base was set up, and including one or more text message, every text message includes unique mark of a record in tables of data and this information that uniquely mark is corresponding.Unique mark can as the major key of every text message, it is placed on the fixed position of every text message, such as, the first character section of every text message places unique mark, and such database inquiry device can get unique mark from the fixed position of text message.
Database inquiry device finds out one or more relevant to more than one key word of the inquiry text message to be selected by text search engine from pre-set text storehouse, if one text message to be selected is all without finding out the key word of the inquiry illustrating that user have input mistake, or the text message simultaneously not mated with the multiple queries keyword of user's input.
Step 103, from described text message to be selected, obtain at least one uniquely identify.
Database inquiry device obtains uniquely identified process, can be that acquiescence obtains uniquely identifying in every text message to be selected, can also is that and a plurality of text message to be selected is shown to user, user therefrom select a text message, then obtain the unique mark in this text message.
Step 104, according to the unique mark inquiry data base obtained, obtain and unique identify corresponding record information with described.
After database inquiry device gets unique mark, can uniquely identify inquiry data base according to this, thus getting the record that this user is saved in the tables of data of data base.Owing to uniquely mark is the unique identifier of a plurality of record in the tables of data of relevant database, therefore this record that uniquely mark is corresponding can be inquired quickly and accurately by unique mark inquiry data base.
It should be noted that, data base query method in the present invention is particularly suited for data base is carried out fuzzy query, the inquiry of data base be divide into two steps by the present invention, first pass through text search engine pre-set text storehouse is scanned for, corresponding text message is inquired by key word of the inquiry, and get unique mark from the fixed position of text message, accurately inquire about data base further according to unique mark.Wherein key word of the inquiry can be more than one, be equivalent to one or more keywords of user's input in fuzzy query, fuzzy query is the full table in data base is scanned inquiring about various information, and the effectiveness of retrieval of data base query method of the present invention exceeds multiple order of magnitude than the fuzzy query of data base.And the size in pre-set text storehouse is up to about the 5/100 of database purchase amount, usual 100 bytes of a text message are just sufficient for requirement, size average out to about the 2K of a customer information in data base.Even if there being the pre-set text library storage size of 1,000,000,000 clients also just about 80GB, and search in the text library of 80G, as long as the slowest also 100 milliseconds namely can return to Query Result, and in the relevant database of 1,000,000,000 records, do fuzzy inquiry of sticking with paste, high-end minicomputer is also required to more than at least 30 minutes could out Query Result, visible, at least 18000 times can be improved by text search performance.
The present embodiment, by adopting text search to get unique mark from pre-set text storehouse, data base is accurately inquired about again through unique mark, realize efficiently quick data base querying, solve that the data base of mass data carries out data base querying and can badly influence the execution efficiency of operation system, even can cause the problem that service response is interrupted because it consumes database resource excessively.
Further, the concrete methods of realizing of the step 103 of said method embodiment may is that instruction, the described text message really selecting instruction to select from described at least one text message to be selected are really selected in reception for indicating user;Obtain the described unique mark in the described described text message really selecting instruction to select.
Specifically, user can pass through interactive interface, the data base querying webpage (WebPage) of such as business operation support system, input inquiry keyword, database inquiry device presets Ben Wenku according to the inquiry of these keys word of the inquiry, carry out text search, get at least one text message to be selected, then at least one text message to be selected is passed through web displaying to user, selected from these text messages to be selected by user and wish that instruction is really selected in the text message obtained generation, database inquiry device gets unique mark of its correspondence according to the text message that user selects.
Such as, user inputs " Xiao Yunjiang ", and database inquiry device inquiry returns following list behind pre-set text storehouse:
23400936757 | Xiao Yunjiang | accountant | Jiangxi | old people's | normal client | 4 years |
12000938102 | Xiao Yunjiang | engineer | Hunan | middle age | top-tier customers | 6 years |
23400936234 | Xiao Yunjiang | student | Sichuan | youngster | normal client | 4 years |
23400923447 | Xiao Yunjiang | teacher | Beijing | youngster | normal client | 4 years | (assume to look for be this Pekinese teacher)
23400923457 | Xiao Yunjiang | lawyer | Nanjing | youngster | normal client | 4 years |
23400936345 | Xiao Yunjiang | unemployed | U.S. | adult's | normal client | 4 years |
23400936237 | Xiao Yunjiang | nothing | Britain | minor's | normal client | 4 years |
23400936227 | Xiao Yunjiang | empty | Guangxi | old people's | normal client | 4 years |
23400944457 | Xiao Yunjiang | driver | Guangdong | old people's | normal client | 4 years |
23400936455 | Xiao Yunjiang | civil servant | Jiangxi | old people's | normal client | 4 years |
23400933345 | Xiao Yunjiang | police | Jiangxi | old people's | normal client | 4 years |
Database inquiry device just can complete search within 100 milliseconds, and returns Query Result.After user clicks the link of certain text message, database inquiry device intercepts " 23400923447 " automatically as unique mark from this text message, then the condition query data base with " 23400923447 " for accurately inquiry, and display to the user that the interface of details or other any interfaces needed.Data base accurately inquires about according to uniquely identified and equally possible accomplishes that hundred Milliseconds complete.Visible, the data base querying of hundred Milliseconds can be realized by the data base query method of the present invention, fully meet the data base querying requirement of mass data.
Optionally, the concrete methods of realizing of the step 103 of said method embodiment is it may also is that obtain uniquely identifying in every text message to be selected.
After database inquiry device gets at least one text message to be selected, it is also possible to these text messages to be selected need not be displayed to the user that, but directly obtain unique mark of every text message to be selected.
Further, before the step 101 of said method embodiment, also include the process setting up pre-set text storehouse.This process includes: corresponding to unique mark of every record in tables of data, select the information mated with preset rules, according to preset format, described information is formed text message from the tables of data of described data base;Described pre-set text storehouse is set up with the text message of composition.
Specifically, the tables of data that the process of setting up in pre-set text storehouse is based in data base.nullEvery record in data base has unique mark,Database inquiry device is corresponding to unique mark of every record in tables of data,Select the information mated with preset rules,Such as,Preset rules includes name、Industry、Region、Age、Grade etc.,So database inquiry device just extracts corresponding information from the table of data base according to preset rules when the information of selection,Further according to preset format, these information is formed text message,Such as,Text message includes six fields altogether,Separate with separator between each field,First field places unique mark,Second field is sequentially placed name to the 6th field、Industry、Region、Age、Grade,So it is easy to database inquiry device and is accurately positioned Query Information and unique mark,And uniquely identifying is every unique mark of record in business support system,Change never.Wherein, when setting up this library default, it is possible to index for many text message, in order to the management of text message.
Further, the data base query method of the present embodiment can also include: when the record in data base occurs to update, the text message in pre-set text storehouse described in synchronized update.
The change of the record in data base includes the value of the information in certain one or more record and changes, or the quantity of the information in certain one or more record and type change, this type of is updated, then corresponding text message in synchronized update pre-set text storehouse.And for data base increasing or deleting certain one or more record, be then synchronize increase or delete corresponding text message in pre-set text storehouse, and re-establish the index of many text message.
Concrete, in the text message other information except unique mark once data change, just can utilize instrument that it is updated, data syn-chronization instrument such as can be utilized to obtain the data of increment change, utilize participle instrument that text message is updated, when updating text message, uniquely identified position can not change, and can not be empty.When the record in tables of data increases or deletes, the text message increasing or reducing in pre-set text storehouse can also be synchronized, and the text message after updating re-started index.In addition, the number of the information that each text message comprises can be indefinite, and may come from the different table of data base, so to associate, for some, the data base querying that multiple table carries out and can also easily convert text search mode to and realize, improved efficiency becomes apparent from.Certainly, the accuracy of information that every text message that the accuracy of search is in that in the pre-set text storehouse set up comprises and comprehensive, the search engine with other is the same, is also have a study and the process optimized.
Further, database inquiry device can also provide interactive interface according to preset rules to described user.This preset rules can be consistent with the above-mentioned preset rules selecting match information from data base, namely selects which information from data base according to preset rules, same, it is possible to these information to be shown on interactive interface according to preset rules.Such as, preset rules includes name, industry, region, age, grade, so database inquiry device can show the input area including above-mentioned several information in interactive interface, such user is when only knowing name, sex, region, " Xiao Yunjiang ", " teacher ", " Beijing " can be filled on the position that this three category information is corresponding respectively, even if user only knows name, it is also possible to fill in " Xiao Yunjiang " on the position that name is corresponding.
Adopt a specific embodiment below, the technical scheme of embodiment of the method shown in Fig. 2 is described in detail.
It is assumed to be customer relation management (CustomerRelationshipManagement, the abbreviation: CRM) system realizes the data base querying of customer data of the telecom operators having 300,000,000 client's amounts.
The first step: set up pre-set text storehouse.Application scenarios according to data base querying sets preset rules, for instance: when client's order business, it is necessary to first find the detailed data of client.The condition of data base querying includes according to customer name, industry, region, age bracket, customer grade, customer address etc., wherein customer address and other information are not in same table, but it is stored separately in address table, all of table is associated by customer ID, and namely customer ID is unique mark.Using customer ID, title, industry, region, age bracket, customer grade in preset rules, customer address is as key word of the inquiry, and designs the preset format of text message: " customer ID | customer name | industry | region | age bracket | customer grade | customer address ".Database inquiry device crawls out corresponding information according to preset rules from the tables of data of data base, and generates the text message of preset format.The corresponding text message of each customer ID.In the present embodiment, database inquiry device needs to capture customer ID (as unique mark), customer name, industry, region, age bracket, customer grade from client's Basic Information Table of data base, it is necessary to capture customer address field from customer address information table.The execution cycle that can be fixedly installed data grabber is every day, and the execution time is 22 points, and grasp mode is increment.Trigger data can also capture when the table of data base changes.
Second step: receive inquiry request and carry out text search.Database inquiry device receives the inquiry request of client from interactive interface, carries out text search, Query Result is fed back to client.Such as:
23400936757 * * district, old people's | normal client | Nanchang City, | Xiao Yunjiang | accountant | Jiangxi | |
12000938102 middle age | top-tier customer | Zhuzhou Hetang District, | Xiao Yunjiang | engineer | Hunan | |
23400936234 youngster | normal client | Chengdu Wu Hou District, | Xiao Yunjiang | student | Sichuan | |
23400923447 Xuanwu District, youngster | normal client | Beijing, | Xiao Yunjiang | teacher | Beijing | |
23400923457 youngster | normal client | Sectors of Gulou Dis trict, Nanjing, | Xiao Yunjiang | lawyer | Nanjing | |
23400936345 | Xiao Yunjiang | the unemployed | U.S. | adult | normal client | Los Angeles |
23400936237 | Xiao Yunjiang | nothing | Britain | minor | normal client | Liverpool |
Empty old people's | normal client | the North Sea, | Guangxi | of 23400936227 | Xiao Yunjiang | |
23400944457 Gong Bei district, old people's | normal client | Zhuhai City, | Xiao Yunjiang | driver | Guangdong | |
23400936455 * * district, old people's | normal client | Jiujiang City, | Xiao Yunjiang | civil servant | Jiangxi | |
23400933345 * * county, old people's | normal client | Pingxiang, | Xiao Yunjiang | police | Jiangxi | |
It should be noted that, second step is optional step, namely database inquiry device carries out after text searches element according to more than one key word of the inquiry, it is also possible to text message to be selected is not fed back to client, and client is immediately seen the information of the relative recording checked out from the tables of data of data base.
3rd step, obtains unique mark according to the text message that client chooses.Client selects one from the text inquiry result of feedback, and namely database inquiry device obtains unique mark from the first field of text information.
Accordingly, text message to be selected is not fed back to client by database inquiry device, then be the unique mark obtaining every text message to be selected from least one text message to be selected that text search obtains, or obtains unique mark of Article 1 text message to be selected.
The unique mark accurately inquiry of 4th step, basis.Database inquiry device is after data base accurately inquires about according to unique mark, can get this record information that uniquely mark is corresponding, more in the form of a web page these information is shown to client.
It should be noted that, said method embodiment mainly illustrates for the customer data query in business support system, but the data base query method of the present invention is not limited to business support system, as long as the demand for database data library inquiry, the method that can adopt the present invention is replaced, and is not specifically limited herein.
Fig. 3 is the structural representation of an embodiment of database inquiry device of the present invention, as shown in Figure 3, the device of the present embodiment may include that receiver module 11, text query module 12, acquisition module 13 and database query module 14, wherein, receiver module 11, for receiving inquiry request, described inquiry request includes the more than one key word of the inquiry of user's input;Text query module 12, for according to one above key word of the inquiry inquiry pre-set text storehouse, obtaining at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;Acquisition module 13, uniquely identifies for obtaining at least one from described text message to be selected;Database query module 14, for according to the unique mark inquiry data base obtained, obtaining the record information corresponding with described unique mark.
The device of the present embodiment, it is possible to for performing the technical scheme of embodiment of the method shown in Fig. 2, it is similar with technique effect that it realizes principle, repeats no more herein.
Further, described acquisition module 13, really selects instruction specifically for receiving, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user;Obtain the described unique mark in the described described text message really selecting instruction to select.
Optionally, described acquisition module 13, specifically for obtaining the unique mark in every text message to be selected.
Fig. 4 is the structural representation of another embodiment of database inquiry device of the present invention, as shown in Figure 4, the device of the present embodiment is on the basis of Fig. 3 shown device structure, further, can also include: text library sets up module 15, display module 16 and more new module 17, wherein, text library sets up module 15, for corresponding to unique mark of every record in tables of data, from the tables of data of described data base, select the information mated with preset rules, according to preset format, described information is formed text message;Described pre-set text storehouse is set up with the text message of composition.Display module 16, for providing interactive interface according to preset rules to described user.More new module 17, when occurring to update for the record in data base, the text message in pre-set text storehouse described in synchronized update.
The device of the present embodiment, it is possible to for performing the technical scheme of embodiment of the method shown in Fig. 2, it is similar with technique effect that it realizes principle, repeats no more herein.
Fig. 5 is the structural representation of an embodiment of database inquiry facility of the present invention, as shown in Figure 5, the equipment of the present embodiment may include that (input/output is called for short: I/O) interface 11, memorizer 12, processor 13 and bus 14 in input and output.Wherein, processor 13, memorizer 12 and input/output interface 11 are communicated to connect by bus 14.
Input/output interface 11 is used for realizing terminal and other equipment or communication network (such as but not limited to public land mobile network (PublicLandMobileNetwork, it is called for short: PLMN)/PSTN (PublicSwitchedTelephoneNetwork, be called for short: PSTN), the Internet etc.) between communication.In the embodiment of the present invention, database inquiry facility can be interacted with user by I/O interface 11.Such as, I/O interface 11 can be used for receiving inquiry request, and described inquiry request includes the more than one key word of the inquiry of user's input.
Memorizer 12, is used for storing program code, and the program code of storage can be performed by processor 13.
Processor 13, general central processing unit (CentralProcessingUnit can be adopted, CPU), microprocessor, application specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), or one or more integrated circuit, it is used for running relative program.In the embodiment of the present invention, processor 13 can be used for performing the program code in memorizer 12, realize following process: according to one above key word of the inquiry inquiry pre-set text storehouse, obtain at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;From described text message to be selected, obtain at least one uniquely identify;According to the unique mark inquiry data base obtained, obtain the record information corresponding with described unique mark.The described concrete processing procedure of processor 13 is referred to the embodiment of the method part shown in Fig. 2, repeats no more here.
Bus 14 can include a path, transmits information between all parts (such as processor 13, memorizer 12 and I/O interface 11).
In an optional embodiment, described memorizer 12, it is also possible to be used for storing described pre-set text storehouse.
This pre-set text storehouse can be set up based on the tables of data in data base by processor 13.Wherein, processor 13 is set up the process in pre-set text storehouse and is comprised the steps that processor 13 is for corresponding to unique mark of every record in tables of data, from the tables of data of described data base, select the information mated with preset rules, according to preset format, described information is formed text message;Described pre-set text storehouse is set up with the text message of composition.
Further, described processor 13, it may also be used for when the record in data base occurs to update, the text message in pre-set text storehouse described in synchronized update.
In embodiments of the present invention, obtain uniquely identified process to be realized by following two mode:
Mode one: realization with I/O interface 11 and processor 13.Concrete, described I/O interface 11, it is additionally operable to receive and really selects instruction, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user.Described processor 13, specifically for obtaining the described unique mark in the described described text message really selecting instruction to select.
Mode two: independently realized by processor 13.Concrete, processor 13 is for obtaining the unique mark in every text message to be selected.
Further, described I/O interface 11, it may also be used for interactive interface will be shown to described user according to preset rules.
The equipment of the present embodiment, it is possible to for performing the technical scheme of embodiment of the method shown in Fig. 2, it is similar with technique effect that it realizes principle, repeats no more herein.
Fig. 6 is the structural representation of another embodiment of database inquiry system of the present invention, and as shown in Figure 6, the system of the present embodiment may include that database inquiry device 21 and data base 22;Wherein, described database inquiry device 21 can adopt the structure of Fig. 3 or Fig. 4 shown device embodiment, and it is accordingly, it is possible to performing the technical scheme of embodiment of the method shown in Fig. 2, it is similar with technique effect that it realizes principle, repeats no more herein;Described data base 22 is for storing the tables of data including record information.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can be completed by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program upon execution, performs to include the step of above-mentioned each embodiment of the method;And aforesaid storage medium includes: the various media that can store program code such as ROM, RAM, magnetic disc or CDs.
Last it is noted that various embodiments above is only in order to illustrate technical scheme, it is not intended to limit;Although the present invention being described in detail with reference to foregoing embodiments, it will be understood by those within the art that: the technical scheme described in foregoing embodiments still can be modified by it, or wherein some or all of technical characteristic is carried out equivalent replacement;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (13)

1. a data base query method, it is characterised in that including:
Receiving inquiry request, described inquiry request includes the more than one key word of the inquiry of user's input;
According to one above key word of the inquiry inquiry pre-set text storehouse, obtain at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;
From described text message to be selected, obtain at least one uniquely identify;
According to the unique mark inquiry data base obtained, obtain the record information corresponding with described unique mark.
2. method according to claim 1, it is characterised in that described obtain at least one from described text message to be selected and uniquely identify, including:
Receive and really select instruction, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user;
Obtain the described unique mark in the described described text message really selecting instruction to select.
3. method according to claim 1, it is characterised in that described obtain at least one from described text message to be selected and uniquely identify, including:
Obtain the unique mark in every text message to be selected.
4. the method according to any one of claim 1-3, it is characterised in that before described reception inquiry request, also include:
Corresponding to unique mark of every record in tables of data, from the tables of data of described data base, select the information mated with preset rules, according to preset format, described information is formed text message;
Described pre-set text storehouse is set up with the text message of composition.
5. the method according to any one of Claims 1 to 4, it is characterised in that before described reception inquiry request, also include:
Interactive interface is provided to described user according to preset rules.
6. the method according to any one of Claims 1 to 4, it is characterised in that described method also includes:
When record in data base occurs to update, the text message in pre-set text storehouse described in synchronized update.
7. a database inquiry device, it is characterised in that including:
Receiver module, is used for receiving inquiry request, and described inquiry request includes the more than one key word of the inquiry of user's input;
Text query module, for according to one above key word of the inquiry inquiry pre-set text storehouse, obtaining at least one to be selected text message corresponding with the above key word of the inquiry of one;Described pre-set text storehouse is based on what the tables of data in data base was set up, and described pre-set text storehouse includes one or more text message, and every text message includes unique mark of a record in described tables of data and the information corresponding with this unique mark;
Acquisition module, uniquely identifies for obtaining at least one from described text message to be selected;
Database query module, for according to the unique mark inquiry data base obtained, obtaining the record information corresponding with described unique mark.
8. device according to claim 7, it is characterised in that described acquisition module, really selects instruction specifically for receiving, the described text message really selecting instruction to select from described at least one text message to be selected for indicating user;Obtain the described unique mark in the described described text message really selecting instruction to select.
9. device according to claim 7, it is characterised in that described acquisition module, specifically for obtaining the unique mark in every text message to be selected.
10. the device according to any one of claim 7~9, it is characterised in that also include:
Text library sets up module, for corresponding to unique mark of every record in tables of data, selecting the information mated with preset rules, according to preset format, described information is formed text message from the tables of data of described data base;Described pre-set text storehouse is set up with the text message of composition.
11. the device according to any one of claim 7~10, it is characterised in that also include:
Display module, for providing interactive interface according to preset rules to described user.
12. the device according to any one of claim 7~10, it is characterised in that also include:
More new module, when occurring to update for the record in data base, the text message in pre-set text storehouse described in synchronized update.
13. a database inquiry system, it is characterised in that including:
Database inquiry device and data base;Wherein,
Described database inquiry device adopts the device according to any one of claim 7~12;Described data base is for storing the tables of data including record information.
CN201410782436.0A 2014-12-16 2014-12-16 Database query method, device and system Pending CN105760380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410782436.0A CN105760380A (en) 2014-12-16 2014-12-16 Database query method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410782436.0A CN105760380A (en) 2014-12-16 2014-12-16 Database query method, device and system

Publications (1)

Publication Number Publication Date
CN105760380A true CN105760380A (en) 2016-07-13

Family

ID=56337065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410782436.0A Pending CN105760380A (en) 2014-12-16 2014-12-16 Database query method, device and system

Country Status (1)

Country Link
CN (1) CN105760380A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085568A (en) * 2017-03-29 2017-08-22 腾讯科技(深圳)有限公司 A kind of text similarity method of discrimination and device
CN109086426A (en) * 2018-08-09 2018-12-25 北京大米科技有限公司 Data query method, apparatus, computer equipment and readable storage medium storing program for executing
CN109543053A (en) * 2018-10-15 2019-03-29 深圳市轱辘汽车维修技术有限公司 Querying method, device, terminal and the computer readable storage medium of circuit diagram
CN109635009A (en) * 2018-12-27 2019-04-16 北京航天智造科技发展有限公司 Fuzzy matching inquiry system and method
CN110019544A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Data query method and system
CN110377647A (en) * 2019-07-30 2019-10-25 江门职业技术学院 One kind being based on distributed data base demand information querying method and system
WO2020029154A1 (en) * 2018-08-09 2020-02-13 北京大米科技有限公司 Data query method and apparatus, and electronic device
CN111708848A (en) * 2020-06-12 2020-09-25 北京思特奇信息技术股份有限公司 Data query method and system and electronic equipment
CN113239054A (en) * 2021-05-11 2021-08-10 北京百度网讯科技有限公司 Information generation method, related device and computer program product
CN113821708A (en) * 2020-06-19 2021-12-21 广东美的厨房电器制造有限公司 Cooking information acquisition method and device, terminal and storage medium
CN113947349A (en) * 2021-09-28 2022-01-18 安徽云星空信息科技有限公司 Material data processing method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060294164A1 (en) * 2005-06-23 2006-12-28 Emc Corporation Methods and apparatus for managing the storage of content in a file system
CN103020322A (en) * 2013-01-11 2013-04-03 曙光信息产业(北京)有限公司 Query method
CN103150365A (en) * 2013-03-05 2013-06-12 交通银行股份有限公司 Method and equipment for performing fuzzy search by using background system of bank

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060294164A1 (en) * 2005-06-23 2006-12-28 Emc Corporation Methods and apparatus for managing the storage of content in a file system
CN103020322A (en) * 2013-01-11 2013-04-03 曙光信息产业(北京)有限公司 Query method
CN103150365A (en) * 2013-03-05 2013-06-12 交通银行股份有限公司 Method and equipment for performing fuzzy search by using background system of bank

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085568A (en) * 2017-03-29 2017-08-22 腾讯科技(深圳)有限公司 A kind of text similarity method of discrimination and device
CN107085568B (en) * 2017-03-29 2022-11-22 腾讯科技(深圳)有限公司 Text similarity distinguishing method and device
CN110019544A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Data query method and system
CN109086426A (en) * 2018-08-09 2018-12-25 北京大米科技有限公司 Data query method, apparatus, computer equipment and readable storage medium storing program for executing
WO2020029154A1 (en) * 2018-08-09 2020-02-13 北京大米科技有限公司 Data query method and apparatus, and electronic device
CN109543053A (en) * 2018-10-15 2019-03-29 深圳市轱辘汽车维修技术有限公司 Querying method, device, terminal and the computer readable storage medium of circuit diagram
CN109635009A (en) * 2018-12-27 2019-04-16 北京航天智造科技发展有限公司 Fuzzy matching inquiry system and method
CN109635009B (en) * 2018-12-27 2023-09-15 北京航天智造科技发展有限公司 Fuzzy matching inquiry system
CN110377647A (en) * 2019-07-30 2019-10-25 江门职业技术学院 One kind being based on distributed data base demand information querying method and system
CN110377647B (en) * 2019-07-30 2022-07-29 江门职业技术学院 Demand information query method and system based on distributed database
CN111708848A (en) * 2020-06-12 2020-09-25 北京思特奇信息技术股份有限公司 Data query method and system and electronic equipment
CN111708848B (en) * 2020-06-12 2024-02-23 北京思特奇信息技术股份有限公司 Data query method, system and electronic equipment
CN113821708A (en) * 2020-06-19 2021-12-21 广东美的厨房电器制造有限公司 Cooking information acquisition method and device, terminal and storage medium
CN113239054A (en) * 2021-05-11 2021-08-10 北京百度网讯科技有限公司 Information generation method, related device and computer program product
CN113239054B (en) * 2021-05-11 2024-05-07 北京百度网讯科技有限公司 Information generation method and related device
CN113947349A (en) * 2021-09-28 2022-01-18 安徽云星空信息科技有限公司 Material data processing method and system

Similar Documents

Publication Publication Date Title
CN105760380A (en) Database query method, device and system
CN111259006B (en) Universal distributed heterogeneous data integrated physical aggregation, organization, release and service method and system
CN108920716B (en) Data retrieval and visualization system and method based on knowledge graph
JP5613951B2 (en) Method for aggressive information push notification and server therefor
CN106250568B (en) Service range determines method, logistics service provider recommended method and related device
CN105446972A (en) Search method, device and system based on and fusing with user relation data
CN102231152B (en) Searching method for precisely inquiring based on IP (Internet Protocol) address of mobile terminal
WO2013030595A1 (en) Identifying data items
CN102164186A (en) Method and system for realizing cloud search service
CN101464894A (en) Data query method and system
RU2632414C2 (en) Method of hierarchical data structure forming, method of data search using hierarchical data structure, server and permanent machine-readable media
CN106547646B (en) Data backup and recovery method and data backup and recovery device
CN108319608A (en) The method, apparatus and system of access log storage inquiry
CN103186666A (en) Method, device and equipment for searching based on favorites
CN109271449A (en) A kind of distributed storage inquiry system file-based and querying method
CN104636477A (en) Push list duplicate removal method before information push
CN106649602A (en) Way, device and server of processing business object data
CN104580448A (en) Information push method and device
CN104462096A (en) Public opinion monitoring and analysis method and device
CN103731437A (en) Method and system for configuring information delivery
WO2017000592A1 (en) Data processing method, apparatus and system
CN102508884A (en) Method and device for acquiring hotpot events and real-time comments
CN101963993B (en) Method for fast searching database sheet table record
CN101133415A (en) Server, method and system for providing information search service by using sheaf of pages
CN102937977A (en) Search server and search method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160713