CN102609421A - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN102609421A
CN102609421A CN2011100255100A CN201110025510A CN102609421A CN 102609421 A CN102609421 A CN 102609421A CN 2011100255100 A CN2011100255100 A CN 2011100255100A CN 201110025510 A CN201110025510 A CN 201110025510A CN 102609421 A CN102609421 A CN 102609421A
Authority
CN
China
Prior art keywords
data
database server
unit
group
user
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
CN2011100255100A
Other languages
Chinese (zh)
Other versions
CN102609421B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN2011100255100A priority Critical patent/CN102609421B/en
Publication of CN102609421A publication Critical patent/CN102609421A/en
Priority to HK12110529.5A priority patent/HK1169870A1/en
Application granted granted Critical
Publication of CN102609421B publication Critical patent/CN102609421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data query method and a data query device. The method comprises the steps: based on respective corresponding fields of data stored in each database server, extracting the data corresponding to appointed fields from each database server; associating the data extracted from each database server so as to generate associated query data; and carrying out the query on data corresponding to query key words in the generated associated query data according to the received query key words. As the technical scheme of the invention is adopted, the problems that in the prior art more query processing resources are consumed and the efficiency in data query is low are solved.

Description

Data enquire method and device
Technical field
The application relates to technical field of data processing, relates in particular to a kind of data enquire method and device.
Background technology
Database server be according to data structure organize, the warehouse of storage and management data, in the routine work of economic management, usually need be in database server, and handle accordingly based on the needs of management some relevant storage.For example; The personnel department of enterprise or public institution usually will leave in the worker's of our unit basic condition (for example duty job number, name, age, sex, native place, wage, resume etc.) in the database server; Follow-up certain worker's of inquiry basic condition in database server at any time also can be inquired about wage worker's number in certain scope or the like.
In the prior art, enterprise stores client's related data in the database server into usually, so as follow-uply to inquire about, processing such as management; Development along with enterprise; Particularly the data center of large enterprise is along with the development of business, all in continuous differentiation, usually with the data storage of different field in different database servers; For example customer information is stored in the database server 1; Client's sequence information is stored in the database server 2, client's product information is stored in the database server 3, client's financial information is stored in the database server 4.Different database servers possibly supported different character set; (wherein character set is specified when creating database, create can not change usually after accomplishing), and can not support the transcoding of character set between disparate databases; Therefore if want to search all related datas of client; Then need in a plurality of database servers, inquire about respectively, this has just reduced the efficient of data query, has also expended more query processing resource.
Summary of the invention
The application embodiment provides a kind of data enquire method and device, in order to solve exist in the prior art expended more query processing resource, the problem that the efficient of data query is lower.
The application embodiment technical scheme is following:
A kind of data enquire method, the method comprising the steps of: based on the corresponding respectively field of the data of storing in each database server, from each database server, extract the corresponding data of specific field respectively; The data that will from each database server, extract are carried out association, generate the correlation inquiry data; According to the searching keyword that receives, in the correlation inquiry data that generate, inquire about the corresponding data of said searching keyword.
A kind of data query device comprises: extraction unit, and the data that are used for storing based on each database server are distinguished corresponding field, from each database server, extract the corresponding data of specific field respectively; Generation unit is used for extraction unit is carried out association from the data that each database server extracts, and generates the correlation inquiry data; First receiving element is used to receive the searching keyword that the user imports; Query unit is used for the said searching keyword that receives according to first receiving element, in the correlation inquiry data that generation unit generates, inquires about the corresponding data of said searching keyword.
In the application embodiment technical scheme, at first, from each database server, extract the corresponding data of specific field respectively based on the corresponding respectively field of the data of storing in each database server; The data that will from each database server, extract are then carried out association, generate the correlation inquiry data, according to the searching keyword that receives; In the correlation inquiry data that generate; Inquire about the corresponding data of said searching keyword, therefore the application embodiment technical scheme extracts the data that the user possibly inquire about respectively from each database server; Form the correlation inquiry data; When subsequent user input inquiry keyword is inquired about, can directly in the correlation inquiry data, inquire about, and need in a plurality of database servers, not inquire about respectively; Therefore can save a large amount of query processing resources, improve the efficient of data query effectively.
Description of drawings
Fig. 1 is among the application embodiment one, the data enquire method schematic flow sheet;
Fig. 2 is among the application embodiment two, the concrete realization flow synoptic diagram of data enquire method;
Fig. 3 is among the application embodiment three, data query apparatus structure synoptic diagram.
Embodiment
At length set forth to the main realization principle of the application embodiment technical scheme, embodiment and to the beneficial effect that should be able to reach below in conjunction with each accompanying drawing.
Embodiment one
As shown in Figure 1, in the application embodiment one, the data enquire method process flow diagram, its concrete processing procedure is following:
Step 11 based on the corresponding respectively field of the data of storing in each database server, extracts the corresponding data of specific field respectively from each database server;
Wherein, All store the data of magnanimity in each database server; For example store each client's customer name, phone number, e-mail address, home address in certain database server of enterprise, then this database server can but be not limited to these data of stored in form with table 1:
Table 1:
Figure BDA0000045014420000031
In table 1; Each database server can but be not limited to adopt the mode of field corresponding data to store data; For example " customer name ", " phone number ", " e-mail address " and " home address " are the field identification information of each field; The data that each field is corresponding one type, for example:
Customer name
The client 1
The client 2
……
In table 1; Comprise at least one group of data in the data of each database server stores, the corresponding different field of each data in every group of data is if database server is according to the stored in form data of form; Then the data of each row can be one group of data in the form, for example:
Figure BDA0000045014420000041
In the data of database server stores; The user possibly only need the inquiry corresponding data of a part of field wherein, maybe can only inquire about the corresponding data of a part of field wherein, therefore can be directed against each database server; Determine the user in advance and need inquire about the field that maybe can inquire about; Then these fields are made as specific field, when generating the correlation inquiry data, only need to extract the corresponding data of these specific fields and get final product.
For example; In the data of " customer name ", " phone number ", " e-mail address " and " home address " four fields; The user only needs inquiry " customer name ", " phone number " and " e-mail address " these three fields, and therefore setting " customer name ", " phone number " and " e-mail address " are specific field in advance, when extracting data; Only extract the corresponding data of these specific fields, the data that extract are as shown in table 2:
Table 2:
Customer name Phone number E-mail address
The client 1 138xxxxxxxx Zhangsanxxx.com
The client 2 136xxxxxxxx lisixxx.com
…… …… ……
Because the data of each database server stores are different, so the specific field of each database server correspondence is also different.If the corresponding data of all fields of storing in the database server are the data that the user need inquire about or can inquire about, so just can be directly all data of this database server stores be all extracted.
Among the application embodiment one, when needs extract data from database server, can start backup (dump) process; Read configuration file,, confirm to need to extract each database server of data and the specific field of each database server according to configuration file; If only need from a database server, extract data, then directly from this database server, extract the corresponding data of specific field, from least two database servers, extract data if desired; Then can start a plurality of threads, each thread extracts the corresponding data of specific field respectively from a database server, for example; Need from N database server, extract data, then can but be not limited to start P thread, wherein P≤N; Each thread is responsible for a database server; After from this database server, extracting the corresponding data of specific field, the data that extract are saved in the corresponding intermediate file of this database server database server D iCorresponding intermediate file C i, 1≤i≤N.
Step 12, the data that will from each database server, extract are carried out association, generate the correlation inquiry data;
If only need from a database server, extract data, then the data that extract are carried out being the correlation inquiry data after format conversion etc. handles;
If need from least two database servers, extract data, then can but be not limited to generate the correlation inquiry data through following method, be specially:
At first confirm the shut sequence of each database server; According to the shut sequence of determining; In each database server, select first database server, to every group of data that from said first database server, extract, carry out following operation respectively then:
These group data are confirmed as the associated group data of first database server; In non-selected each second database server,, select first second database server according to the shut sequence of determining; The data that second database server from this selection extracts, according to and a last database server between same field, confirm associated group data with the associated group data association of a last database server; If second database server of selecting is last database server, then association process finishes; Otherwise according to the shut sequence of determining; Select next second database server; And return and continue to carry out the data that second database server from this selection extracts, confirm operation with the associated group data of the associated group data association of a last database server;
Based on each associated group data of determining, generate corresponding correlation inquiry group data;
According to every group of correlation inquiry group data that data generate respectively, generate the correlation inquiry data.
Wherein, can but be not limited to confirm the shut sequence of each database server through following manner, be specially:
At first in database server; Select first database server (can but be not limited to picked at random); Then in non-selected database server; Determine the database server (possibly exist a database server also possibly have a plurality of database servers) that has same field with the database server of this selection, in the database server of determining, select next database server (can but be not limited to picked at random), if this database server is last database server; Then deterministic process finishes; Continue to carry out in non-selected database server otherwise return, determine the database server that has same field with the database server of this selection, and in the database server of determining, select the operation of next database service.
The application embodiment one proposes, and for any two database servers, the same field that all comprises in two database servers is the associate field between these two database servers.Wherein each database server can have same same field; Be that associate field between any two database servers is all identical; For example all comprise " customer name " field in all database servers, the associate field between so any two database servers is " customer name " field; Certainly; Between any two database servers same field also can be different; For example all comprise " customer name " field in database server 1 and the database server 2; Associate field between database server 1 and the database server 2 is " customer name " field so, does not comprise " customer name " field in the database server 3, but also stores " phone number " field in the database server 2; Also store " phone number " field in the database server 3, the associate field between database server 2 and the database server 3 is " phone number " field so.Associate field between any two database servers can be stored in the configuration file in advance, so just can directly determine the associate field between any two database servers based on configuration file.
For example, need carry out related database server is database server D 1, database server D 2, database server D 3With database server D 4, when confirming shut sequence, at first in above-mentioned 4 database servers, select first database server, suppose that first database server of selecting is database server D 1, in remaining database server, with database server D 1Between exist the database server of associate field to comprise database server D 2With database server D 3, at database server D 2With database server D 3Database server of middle selection supposes that as second database server the database server of selecting is database server D 2, with database server D 2Between exist the database server of associate field to comprise database server D 3With database server D 4, at database server D 3With database server D 4Database server of middle selection supposes that as the 3rd database server the database server of selecting is database server D 3, database server D 3With database server D 4Between have associate field, database server D 4Be the 4th database server, the shut sequence of therefore determining is D 1→ D 2→ D 3→ D 4
Among the application embodiment one, can but be not limited to start the association process that a plurality of threads are responsible for every group of data respectively, for example start M thread, first database server is database server D 1, then each thread is at first from database server D 1Corresponding intermediate file C 1One group of data of middle extraction, wherein these group data also can be called database server D 1To the associated group data of these group data, specified data storehouse server D then 1With database server D 2Between associate field, according to the data of this associate field in these group data that extract, at database server D 2Corresponding intermediate file C 2Middle search obtains database server D 2To the associated group data of these group data that extract, and then specified data storehouse server D 2With database server D 3Between associate field, according to database server D 2The associated group data in the data of this associate field, at database server D 3Corresponding intermediate file C 3Middle search obtains database server D 3To the associated group data of these group data that extract, and the like, until obtaining the associated group data of each database server,, generate the corresponding correlation inquiry group data of these group data then according to each associated group data to these group data that extract.
To intermediate file C 1In every group of data; All carry out above-mentioned steps, can obtain the corresponding correlation inquiry group data of every group of data, then according to each the correlation inquiry group data that obtains; Generate the correlation inquiry data; Promptly be combined into an integrated data table, needed form when this data tableau format satisfies data query, and this integrated data table outputed in the final data library file.
For example, intermediate file C 1The data of middle storage are as shown in table 2, intermediate file C 2The data of middle storage are as shown in table 3, intermediate file C 3The data of middle storage are as shown in table 4:
Table 3:
Figure BDA0000045014420000081
Table 4:
Order number The order amount of money
Order 1 10000 yuan
Order 2 3000 yuan
Order 3 5000 yuan
Order 4 6000 yuan
…… ……
Database server D 1With database server D 2Between associate field be " customer name ", database server D 2With database server D 3Between associate field be " order number ", then to these corresponding group data of the row of second in the table 2, each associated group data of generation are respectively:
Order 1 10000 yuan
Order 2 3000 yuan
The correlation inquiry group data that generate are:
To these corresponding group data of the third line in the table 2, each associated group data of generation are respectively:
Figure BDA0000045014420000093
Order 3 5000 yuan
Order 4 6000 yuan
The correlation inquiry group data that generate are:
Figure BDA0000045014420000094
The correlation inquiry data that so, finally generate are as shown in table 5:
Table 5:
Figure BDA0000045014420000101
Step 13 according to the searching keyword that receives, in the correlation inquiry data that generate, is inquired about the corresponding data of said searching keyword.
Among the application embodiment, can be behind the searching keyword that receives user's input, this searching keyword of search in the correlation inquiry data that generate, and then search corresponding data.
In order to improve the efficient of inquiry, save the query processing resource, the application embodiment one proposes; Before the corresponding data of the said searching keyword of inquiry; The all right positional information of further confirming each data in the said correlation inquiry data is formed location index with the positional information of all data then, and is follow-up when the data of the said searching keyword correspondence of inquiry; Just can be earlier in the positional information of each data; Confirm the positional information of said searching keyword in said correlation inquiry data, then according to the positional information of determining, the corresponding data of the said searching keyword of inquiry in said correlation inquiry data; This has just saved the step of search query keywords in the correlation inquiry data that generate; Directly confirm that according to positional information the position of this searching keyword gets final product, thereby improved search efficiency, saved the query processing resource.
After finding the corresponding data of this searching keyword, can the data output that inquire promptly be offered the user.
Prior art need be distinguished data query in different database servers when data query, need to get into different query interfaces and repeatedly inquire about, and just possibly find the data of wanting, even because convenience is lower, and search less than the data of wanting.The technical scheme that the application embodiment one proposes is come out the data extract in the disparate databases server; And be associated to a comprehensive tables of data; The user only need import the one query keyword, just can find the data that are distributed in all database servers.
In addition, the application embodiment one also proposes, and a plurality of input frames can be set at user's query interface; Different searching keywords adopts different input frames, more preferably, and in order to improve the convenience of user inquiring; An input frame can also only be set at user's query interface; Different searching keywords all adopts same input frame, and what data no matter the user search like this, can be in an input frame input inquiry keyword; Thereby strengthened the dirigibility of man-machine interaction, improved user's inquiry effectively and experienced.
Because the data that each user can inquire about maybe be different; For example user 1 can only inquire about client 1~client 10 related data; And user 2 can only inquire about client 11~client 20 related data; To this, the application embodiment one user right of giving chapter and verse is the method that the user provides data, is specially:
Before the data that inquire are offered this user; Receive the user profile of said user's input,, confirm this user's search access right then according to the user profile that receives; When the data that inquire are offered this user; At first in all data that inquire, select the data that satisfy said search access right, the data of selecting are offered this user.
For example; The data that the searching keyword of importing according to user 1 inquires comprise client 1~client 20 related data; Before the data that inquire are offered user 1, confirm user 1 search access right earlier, can determine the related data that user 1 can only inquire about client 1~client 10 according to user 1 search access right; Therefore in the data that inquire, select client 1~client 10 related data, and then offer user 1.
In addition; The certain user is when data query; Possibly only want to see the data of a certain field correspondence, for example the user only wants to inquire about according to certain client's phone number this client's order number, at this moment; Can according to the method described above that this client's phone number is corresponding all data (for example customer name, e-mail address, fax number etc.) all offer the user, the user searches the data of really wanting again from the data that provide then; In addition, for the data that let more convenient, the simpler inquiry of user really want, the application embodiment one proposes; Can also point out the user when the input inquiry keyword; Input inquiry destination field identification information, for example the destination field that need inquire about of user is " order number ", then the user can be in input client phone number; Also import the field identification information of " order number " this field; Searching keyword and search purposes field identification information can but be not limited to adopt two input frames, after inquiring the corresponding data of this searching keyword, can further select the data of the corresponding field of this search purposes field identification information; For example in the data that inquire, select the data of " order number " this field; Then the data of selecting are offered this user, the user just can directly obtain the data of " order number " this field like this, and need not in the data that inquire, to go to search again.
Can know by above-mentioned processing procedure, in the application embodiment technical scheme, at first based on the corresponding respectively field of the data of storing in each database server; From each database server, extract the corresponding data of specific field respectively respectively, the data that will from each database server, extract are then carried out association, generate the correlation inquiry data; According to the searching keyword that receives, in the correlation inquiry data that generate, inquire about the corresponding data of said searching keyword; Therefore; The application embodiment technical scheme extracts the data that the user possibly inquire about respectively from each database server, forms the correlation inquiry data, when subsequent user input inquiry keyword is inquired about; Can directly in the correlation inquiry data, inquire about; And need in a plurality of database servers, not inquire about respectively, therefore can save a large amount of query processing resources, improved the efficient of data query effectively.
Provide more detailed embodiment below.
Embodiment two
As shown in Figure 2, be the concrete realization flow figure of data enquire method that the application embodiment two proposes, its concrete treatment scheme is following:
Step 21 when needs extract data from database server, starts the dump process;
Step 22 starts N thread, and each thread extracts the corresponding data of specific field from a database server;
Step 23, each thread is saved in the data that extract in the corresponding intermediate file of this database server;
Step 24 according to the shut sequence of each database server, is selected first database server in each database server;
Step 25 to every group of data that from said first database server, extract, generates corresponding correlation inquiry group data respectively;
Step 26 according to every group of correlation inquiry group data that data generate respectively, generates the correlation inquiry data;
Step 27, receive the searching keyword of user input after, according to said searching keyword, in the correlation inquiry data that generate, inquire about the corresponding data of said searching keyword;
Step 28 according to this user's user profile, is confirmed this user's search access right;
Step 29 in the data that inquire, is selected the data that satisfy search access right;
Step 210 offers this user with the data that inquire.
Embodiment three
Accordingly, the application embodiment three also provides a kind of data query device, and its structure is as shown in Figure 3, comprises extraction unit 31, generation unit 32, first receiving element 33 and query unit 34, wherein:
Extraction unit 31, the data that are used for storing based on each database server are distinguished corresponding field, from each database server, extract the corresponding data of specific field respectively;
Generation unit 32 is used for extraction unit 31 is carried out association from the data that each database server extracts, and generates the correlation inquiry data;
First receiving element 33 is used to receive the searching keyword that the user imports;
Query unit 34 is used for the said searching keyword that receives according to first receiving element 33, in the correlation inquiry data that generation unit 32 generates, inquires about the corresponding data of said searching keyword.
Preferably, comprise at least one group of data in the data of each database server stores;
Said generation unit 32 comprises that specifically first confirms that subelement, the first chooser unit, second definite subelement, the second chooser unit, the 3rd definite subelement, judgment sub-unit, first generate subelement and second and generate subelement, wherein:
First confirms subelement, is used for confirming the shut sequence of each database server;
The first chooser unit is used for confirming the shut sequence that subelement is determined, selection first database server in each database server according to first;
Second confirms subelement, is used for being directed against the every group of line data that extracts from said first database server, carries out respectively: will organize the associated group data that data are confirmed as first database server;
The second chooser unit; Be used for being directed against the every group of line data that extracts from said first database server, carry out respectively: in non-selected each second database server, confirm the shut sequence that subelement is determined according to first; Select first second database server; And in the judged result of judgment sub-unit for not the time, according to said shut sequence, select next second database server;
The 3rd confirms subelement; Be used for being directed against the every group of line data that extracts from said first database server; Carry out respectively: the data that second database server from this selection extracts; Based on and a last database server between same field, confirm the associated group data related with the associated group data of a last database server;
Judgment sub-unit is used to judge whether second database server that the second chooser unit is selected is last database server, if judged result is for being then association process end;
First generates subelement, is used for being directed against the every group of line data that extracts from said first database server, carries out respectively: based on each group associated group data, generate corresponding correlation inquiry group data;
Second generates subelement, is used for generating subelement to every group of correlation inquiry group data that data generate respectively, generation correlation inquiry data based on first.
First confirms that subelement comprises that specifically first selects module, determination module and second to select module, wherein:
First selects module, is used for selecting first database server at all database servers;
Determination module; Be used at non-selected database server; Determine the database server of database server of selecting module to select with first with same field; And second select module to select database server when be not last database server, in non-selected database server, determine the database server of selecting the database server of module selection to have same field with second;
Second selects module, and the database server that is used for determining at determination module is selected next database server, if this database server of selecting is last database server, then deterministic process finishes.
Preferably, said data query device comprises that also first confirms the unit, is used for before the corresponding data of the said searching keyword of query unit 34 inquiries, confirming the positional information of each data in the said correlation inquiry data respectively;
Said query unit 34 comprises that specifically the 4th confirms subelement and inquiry subelement, wherein:
The 4th confirms subelement, is used for the positional information of confirming each data that the unit is determined first, confirms the positional information of said searching keyword in said correlation inquiry data;
The inquiry subelement is used for confirming the positional information that subelement is determined, the corresponding data of the said searching keyword of inquiry in said correlation inquiry data according to the 4th.
Preferably, said data query device also comprises output unit, is used for the data output that query unit 34 is inquired.
More preferably, said data query device also comprises second receiving element and second definite unit, wherein:
Second receiving element was used for before output unit is with the data that inquire, and received the user profile of said user's input;
Second confirms the unit, is used for the user profile that receives according to second receiving element, confirms this user's search access right;
Said output unit comprises that specifically the 3rd chooser unit and first provides subelement, wherein:
The 3rd chooser unit is used for the data that inquire in query unit 34, selects the data that satisfy said search access right;
First provides subelement, is used for the data that the 3rd chooser unit is selected are offered this user.
More preferably, said data query device also comprises the 3rd receiving element, is used for before output unit is with the data output that inquires, receiving the search purposes field identification information of this user's input;
Said output unit comprises that specifically the 4th chooser unit and second provides subelement, wherein:
The 4th chooser unit is used for the data that inquire in query unit 34, selects the data of the corresponding field of this search purposes field identification information;
Second provides subelement, is used for the data that the 4th chooser unit is selected are offered this user.
The embodiment that it will be understood by those skilled in the art that the application can be provided as method, device (equipment) or computer program.Therefore, the application can adopt the form of the embodiment of complete hardware embodiment, complete software implementation example or combination software and hardware aspect.And the application can be employed in the form that one or more computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) that wherein include computer usable program code go up the computer program of implementing.
The application is that reference is described according to the process flow diagram and/or the block scheme of method, device (equipment) and the computer program of the application embodiment.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block scheme and/or square frame and process flow diagram and/or the block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out through the processor of computing machine or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in ability vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work; Make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device; Make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of on computing machine or other programmable devices, carrying out is provided for being implemented in the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
Although described the application's preferred embodiment, in a single day those skilled in the art get the basic inventive concept could of cicada, then can make other change and modification to these embodiment.So accompanying claims is intended to be interpreted as all changes and the modification that comprises preferred embodiment and fall into the application's scope.Obviously, those skilled in the art can carry out various changes and modification and the spirit and the scope that do not break away from the application to the application.Like this, belong within the scope of the application's claim and equivalent technologies thereof if these of the application are revised with modification, then the application also is intended to comprise these changes and modification interior.

Claims (14)

1. a data enquire method is characterized in that, comprising:
Based on the corresponding respectively field of the data of storing in each database server, from each database server, extract the corresponding data of specific field respectively;
The data that will from each database server, extract are carried out association, generate the correlation inquiry data;
According to the searching keyword that receives, in the correlation inquiry data that generate, inquire about the corresponding data of said searching keyword.
2. the described data enquire method of claim 1 is characterized in that, comprises at least one group of data in the data of each database server stores;
The data that will from each database server, extract are carried out association, generate the correlation inquiry data, specifically comprise:
Confirm the shut sequence of each database server;
According to the shut sequence of determining, in each database server, select first database server;
To every group of data that from said first database server, extract, carry out respectively:
These group data are confirmed as the associated group data of first database server;
In non-selected each second database server,, select first second database server according to the shut sequence of determining;
The data that second database server from this selection extracts, according to and a last database server between same field, confirm associated group data with the associated group data association of a last database server;
If second database server of selecting is last database server, then association process finishes; Otherwise
Based on the shut sequence of determining; Select next second database server; And return and continue to carry out the data that second database server from this selection extracts, confirm the operation of the associated group data related with the associated group data of a last database server;
Based on each associated group data of determining, generate corresponding correlation inquiry group data;
According to every group of correlation inquiry group data that data generate respectively, generate the correlation inquiry data.
3. data enquire method as claimed in claim 2 is characterized in that, confirms the shut sequence of each database server, specifically comprises:
In database server, select first database server;
In non-selected database server, determine the database server that has same field with the database server of this selection;
In the database server of determining, select next database server;
If this database server is last database server, then deterministic process finishes; Otherwise
Return and continue to carry out in non-selected database server, determine the database server that has same field with the database server of this selection, and in the database server of determining, select the operation of next database service.
4. the described data enquire method of claim 1 is characterized in that, inquires about before the corresponding data of said searching keyword, also comprises:
Confirm the positional information of each data in the said correlation inquiry data respectively;
Inquire about the corresponding data of said searching keyword, specifically comprise:
In the positional information of each data, confirm the positional information of said searching keyword in said correlation inquiry data;
According to the positional information of determining, the corresponding data of the said searching keyword of inquiry in said correlation inquiry data.
5. data enquire method as claimed in claim 1 is characterized in that, also comprises:
With the data output that inquires.
6. data enquire method as claimed in claim 5 is characterized in that, before the data output that inquires, also comprises:
According to the user's who imports said searching keyword information, confirm this user's search access right;
Data output with inquiring specifically comprises:
In the data that inquire, select the data that satisfy said search access right;
The data of selecting are offered this user.
7. data enquire method as claimed in claim 5 is characterized in that, before the data output that inquires, also comprises:
Receive the search purposes field identification information of user's input of the said searching keyword of input;
Data output with inquiring specifically comprises:
In the data that inquire, select the data of the corresponding field of this search purposes field identification information;
The data of selecting are offered this user.
8. a data query device is characterized in that, comprising:
Extraction unit, the data that are used for storing based on each database server are distinguished corresponding field, from each database server, extract the corresponding data of specific field respectively;
Generation unit is used for extraction unit is carried out association from the data that each database server extracts, and generates the correlation inquiry data;
First receiving element is used to receive the searching keyword that the user imports;
Query unit is used for the said searching keyword that receives according to first receiving element, in the correlation inquiry data that generation unit generates, inquires about the corresponding data of said searching keyword.
9. data query device as claimed in claim 8 is characterized in that, comprises at least one group of data in the data of each database server stores;
Said generation unit specifically comprises:
First confirms subelement, is used for confirming the shut sequence of each database server;
The first chooser unit is used for confirming the shut sequence that subelement is determined, selection first database server in each database server according to first;
Second confirms subelement, is used for being directed against the every group of line data that extracts from said first database server, carries out respectively: will organize the associated group data that data are confirmed as first database server;
The second chooser unit; Be used for being directed against the every group of line data that extracts from said first database server, carry out respectively: in non-selected each second database server, confirm the shut sequence that subelement is determined according to first; Select first second database server; And in the judged result of judgment sub-unit for not the time, according to said shut sequence, select next second database server;
The 3rd confirms subelement; Be used for being directed against the every group of line data that extracts from said first database server; Carry out respectively: the data that second database server from this selection extracts; Based on and a last database server between same field, confirm the associated group data related with the associated group data of a last database server;
Judgment sub-unit is used to judge whether second database server that the second chooser unit is selected is last database server, if judged result is for being then association process end;
First generates subelement, is used for being directed against the every group of line data that extracts from said first database server, carries out respectively: based on each group associated group data, generate corresponding correlation inquiry group data;
Second generates subelement, is used for generating subelement to every group of correlation inquiry group data that data generate respectively, generation correlation inquiry data based on first.
10. data query device as claimed in claim 9 is characterized in that, first confirms that subelement specifically comprises:
First selects module, is used at database server, selects first database server;
Determination module; Be used at non-selected database server; Determine the database server of database server of selecting module to select with first with same field; And second select module to select database server when be not last database server, in non-selected database server, determine the database server of selecting the database server of module selection to have same field with second;
Second selects module, and the database server that is used for determining at determination module is selected next database server, if this database server of selecting is last database server, then deterministic process finishes.
11. data query device as claimed in claim 8 is characterized in that, also comprises:
First confirms the unit, is used for before query unit is inquired about the corresponding data of said searching keyword, confirming the positional information of each data in the said correlation inquiry data respectively;
Said query unit specifically comprises:
The 4th confirms subelement, is used for the positional information of confirming each data that the unit is determined first, confirms the positional information of said searching keyword in said correlation inquiry data;
The inquiry subelement is used for confirming the positional information that subelement is determined, the corresponding data of the said searching keyword of inquiry in said correlation inquiry data according to the 4th.
12. data query device as claimed in claim 8 is characterized in that, also comprises:
Output unit is used for the data output that query unit is inquired.
13. data query device as claimed in claim 12 is characterized in that, also comprises:
Second receiving element is used for before output unit is with the data output that inquires, receiving the user profile of said user's input;
Second confirms the unit, is used for the user profile that receives according to second receiving element, confirms this user's search access right;
Said output unit specifically comprises:
The 3rd chooser unit is used for the data that inquire in query unit, selects the data that satisfy said search access right;
First provides subelement, is used for the data that the 3rd chooser unit is selected are offered this user.
14. data query device as claimed in claim 12 is characterized in that, also comprises:
The 3rd receiving element is used for before output unit is with the data output that inquires, receiving the search purposes field identification information of this user's input;
Said output unit specifically comprises:
The 4th chooser unit is used for the data that inquire in query unit, selects the data of the corresponding field of this search purposes field identification information;
Second provides subelement, is used for the data that the 4th chooser unit is selected are offered this user.
CN2011100255100A 2011-01-24 2011-01-24 Data query method and device Active CN102609421B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011100255100A CN102609421B (en) 2011-01-24 2011-01-24 Data query method and device
HK12110529.5A HK1169870A1 (en) 2011-01-24 2012-10-23 Method and device for data inquiry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100255100A CN102609421B (en) 2011-01-24 2011-01-24 Data query method and device

Publications (2)

Publication Number Publication Date
CN102609421A true CN102609421A (en) 2012-07-25
CN102609421B CN102609421B (en) 2013-11-13

Family

ID=46526803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100255100A Active CN102609421B (en) 2011-01-24 2011-01-24 Data query method and device

Country Status (2)

Country Link
CN (1) CN102609421B (en)
HK (1) HK1169870A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867064A (en) * 2012-09-28 2013-01-09 用友软件股份有限公司 Associated field query device and associated field query method
CN103744897A (en) * 2013-12-24 2014-04-23 华为技术有限公司 Associated search method and associated search system for fault information, and network management system
CN105843913A (en) * 2016-03-24 2016-08-10 苏州科技学院 Statistical integrated information query system based on corporate economic database
CN106326317A (en) * 2015-07-09 2017-01-11 中国移动通信集团山西有限公司 Data processing method and device
CN107506970A (en) * 2017-07-07 2017-12-22 中国建设银行股份有限公司 A kind of method and system of project data processing
CN107590251A (en) * 2017-09-19 2018-01-16 郑州云海信息技术有限公司 A kind of data managing method and its device
CN108205557A (en) * 2016-12-19 2018-06-26 顺丰科技有限公司 Searching terminal, server-side and information communication search method and system
CN108304731A (en) * 2017-12-21 2018-07-20 山东浪潮云服务信息科技有限公司 A kind of method, system and information processing platform that management business data calls
CN108573010A (en) * 2017-08-25 2018-09-25 北京金山云网络技术有限公司 It is associated with method, apparatus, electronic equipment and the medium of the synonymous data of heterogeneous system
CN109684461A (en) * 2018-12-30 2019-04-26 联想(北京)有限公司 A kind of data processing method and device
CN113094468A (en) * 2021-02-02 2021-07-09 北京融数联智科技有限公司 OT-based multi-data-source relational graph construction and data alignment method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567820B1 (en) * 1997-11-17 2003-05-20 Sun Microsystems, Inc. Method and system for in-place modifications in a database
US20030208458A1 (en) * 2002-04-25 2003-11-06 International Business Machines Corporation Remote data access and integration of distributed data sources through data schema and query abstraction
CN101034445A (en) * 2006-03-06 2007-09-12 英业达股份有限公司 Data processing method and system thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567820B1 (en) * 1997-11-17 2003-05-20 Sun Microsystems, Inc. Method and system for in-place modifications in a database
US20030208458A1 (en) * 2002-04-25 2003-11-06 International Business Machines Corporation Remote data access and integration of distributed data sources through data schema and query abstraction
CN101034445A (en) * 2006-03-06 2007-09-12 英业达股份有限公司 Data processing method and system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王珊等: "《数据库技术与应用》", 30 September 2005, 清华大学出版社 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867064B (en) * 2012-09-28 2015-12-02 用友网络科技股份有限公司 Associate field inquiry unit and associate field querying method
CN102867064A (en) * 2012-09-28 2013-01-09 用友软件股份有限公司 Associated field query device and associated field query method
CN103744897A (en) * 2013-12-24 2014-04-23 华为技术有限公司 Associated search method and associated search system for fault information, and network management system
CN106326317A (en) * 2015-07-09 2017-01-11 中国移动通信集团山西有限公司 Data processing method and device
CN105843913A (en) * 2016-03-24 2016-08-10 苏州科技学院 Statistical integrated information query system based on corporate economic database
CN108205557A (en) * 2016-12-19 2018-06-26 顺丰科技有限公司 Searching terminal, server-side and information communication search method and system
CN107506970A (en) * 2017-07-07 2017-12-22 中国建设银行股份有限公司 A kind of method and system of project data processing
CN108573010A (en) * 2017-08-25 2018-09-25 北京金山云网络技术有限公司 It is associated with method, apparatus, electronic equipment and the medium of the synonymous data of heterogeneous system
CN108573010B (en) * 2017-08-25 2020-06-19 北京金山云网络技术有限公司 Method, device, electronic equipment and medium for associating synonymy data of heterogeneous system
CN107590251A (en) * 2017-09-19 2018-01-16 郑州云海信息技术有限公司 A kind of data managing method and its device
CN108304731A (en) * 2017-12-21 2018-07-20 山东浪潮云服务信息科技有限公司 A kind of method, system and information processing platform that management business data calls
CN108304731B (en) * 2017-12-21 2021-07-06 浪潮卓数大数据产业发展有限公司 Method and system for managing enterprise data call and information processing platform
CN109684461A (en) * 2018-12-30 2019-04-26 联想(北京)有限公司 A kind of data processing method and device
CN113094468A (en) * 2021-02-02 2021-07-09 北京融数联智科技有限公司 OT-based multi-data-source relational graph construction and data alignment method

Also Published As

Publication number Publication date
CN102609421B (en) 2013-11-13
HK1169870A1 (en) 2013-02-08

Similar Documents

Publication Publication Date Title
CN102609421B (en) Data query method and device
CN101860449B (en) Data query method, device and system
CN104090901B (en) A kind of method that data are processed, device and server
US11354367B2 (en) Search engine
CN101216840A (en) Data enquiry method and data enquiry system
CN101477524A (en) System performance optimization method and system based on materialized view
CN104182405A (en) Method and device for connection query
JP5624674B2 (en) How to improve queries for searching databases
CN104268295A (en) Data query method and device
CN104021125A (en) Search engine sorting method and system and search engine
CN106471501A (en) The method of data query, the storage method data system of data object
CN103235811A (en) Data storage method and device
CN111191111A (en) Content recommendation method, device and storage medium
US11860870B2 (en) High efficiency data querying
CN101957860A (en) Method and device for releasing and searching information
CN102325098B (en) Group information acquisition method and system
CN111400301A (en) Data query method, device and equipment
KR20180077830A (en) Processing method for a relational query in distributed stream processing engine based on shared-nothing architecture, recording medium and device for performing the method
CN108073661A (en) Data retrieval method and device, report generating system and method
CN102761617A (en) Workflow queue server and workflow scheduling system and method
US10394826B1 (en) System and methods for searching query data
CN103020300B (en) Method and device for information retrieval
CN110032664A (en) A method of quickly establishing the full node address index of bit coin block chain
CN101452486A (en) System data management method for [inscriptions on bones or tortoise shells and apparatus thereof
JP5031416B2 (en) Search method and search device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1169870

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant