CN103729448A - Method and device for querying data - Google Patents

Method and device for querying data Download PDF

Info

Publication number
CN103729448A
CN103729448A CN201310751022.7A CN201310751022A CN103729448A CN 103729448 A CN103729448 A CN 103729448A CN 201310751022 A CN201310751022 A CN 201310751022A CN 103729448 A CN103729448 A CN 103729448A
Authority
CN
China
Prior art keywords
data query
combination
data
numbering
described data
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
CN201310751022.7A
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.)
Shenzhen Kemanda Intelligent Management Science & Technology Co Ltd
Original Assignee
Shenzhen Kemanda Intelligent Management Science & Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kemanda Intelligent Management Science & Technology Co Ltd filed Critical Shenzhen Kemanda Intelligent Management Science & Technology Co Ltd
Priority to CN201310751022.7A priority Critical patent/CN103729448A/en
Publication of CN103729448A publication Critical patent/CN103729448A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation

Abstract

The invention belongs to the technical field of data processing, and provides a method for querying data. The method comprises the step of obtaining N fields and values corresponding to the N fields to generate a data querying combination, wherein N is an integer larger than or equal to 1; the step of establishing the relation between the preset data querying order and the data querying combination; the step of calling the data querying combination related to the preset data querying order from a preset database to carry out the data query when the preset data querying order is detected. According to the method, the N fields and the values corresponding to the N fields are obtained to generate the data querying combination, the relation between the data querying order and the data querying combination is established, the data querying combination corresponding to the preset data querying order is called according to the data querying order, the data query is carried out in the preset database with the values corresponding to the included N fields and serving as key words, and the efficiency of querying similar or identical content many times is improved.

Description

A kind of data enquire method and device
Technical field
The invention belongs to technical field of data processing, relate in particular to a kind of data enquire method and device.
Background technology
In daily live and work, when retrieve data, form or document, conventionally a plurality of key words need to be set, the feature of the object that needs inquiry described jointly in these key words.When user inquires about close or identical content in different scopes, need to repeat to arrange these key words, as, when manpower assistant director checks the employee's of each branch office situation, while entering the data base querying of each branch office, to repeat to arrange identical a plurality of key words, workload is large, complex operation.
Summary of the invention
The object of the present invention is to provide a kind of data enquire method, be intended to solve the problem that need to repeat to arrange a plurality of key words while repeatedly inquiring about close or identical content in prior art.
The present invention is achieved in that a kind of data enquire method, comprising:
Obtain N field and corresponding value thereof, generated data inquiry combination, N is more than or equal to 1 integer;
Set up the incidence relation of default data query instruction and the combination of described data query;
When described default data query instruction being detected, in presetting database, call the described data query associated with described default data query instruction and be combined into row data query.
Another object of the present invention is to provide a kind of data query device, comprising:
The first acquiring unit, for obtaining N field and corresponding value thereof, generated data inquiry combination, N is more than or equal to 1 integer;
First sets up unit, for setting up the incidence relation of default data query instruction and the combination of described data query;
Query unit for when described default data query instruction being detected, is called the described data query associated with described default data query instruction and is combined into row data query in presetting database.
In the present invention, obtain N field and corresponding value thereof, generated data inquiry combination, set up the incidence relation of data query instruction and data query combination, the data query corresponding with it by this data query instruction calls combines, the value of N Related fields wherein comprising of usining is carried out data query in presetting database as key word, improved the efficiency while repeatedly inquiring about close or identical content.
Accompanying drawing explanation
Fig. 1 is the realization flow figure of the data enquire method that provides of the embodiment of the present invention one;
Fig. 2 is provided by data query Assembly Listing in the data enquire method that provides of the embodiment of the present invention one by the specific implementation process flow diagram of the value of the Related fields that data query combination comprises;
Fig. 3 is the schematic diagram that the interface of data query combination is provided in the data enquire method that provides of the embodiment of the present invention one;
Fig. 4 is the structured flowchart of the data query device that provides of the embodiment of the present invention two.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In embodiments of the present invention, obtain N field and corresponding value thereof, generated data inquiry combination, set up the incidence relation of data query instruction and data query combination, the data query corresponding with it by this data query instruction calls combines, the value of N Related fields wherein comprising of usining is carried out data query in presetting database as key word, improved the efficiency while repeatedly inquiring about close or identical content.
Fig. 1 shows the realization flow of the data enquire method that the embodiment of the present invention one provides, and details are as follows:
In step S101, obtain N field and corresponding value thereof, generated data inquiry combination, N is more than or equal to 1 integer.
When retrieve data, conventionally can the feature of the object that needs inquiry be described from different angles, according to different angles, corresponding field is set, as fields such as time of origin, device name, device types.Each field has again its corresponding value, and value as corresponding in time of origin is on Dec 1st, 1 day 1 January calendar year 2001 etc., and the value of each Related fields has been described the feature that needs query object jointly as key word.When inquiring about identical content, the value of Related fields is identical.
In embodiments of the present invention, obtain the value generated data inquiry combination of several Related fields of being inputted by user, with this data query combination, make the feature that as a whole description needs query object.
In step S102, set up the incidence relation of default data query instruction and the combination of described data query.
Set up after data query combination, set up the incidence relation between data query instruction and data query combination, by this data query instruction, carry out rapidly data query.The sign that should comprise data query combination in data query instruction, sign can be the title of data query combination or numbering etc.At user-selected number, it is investigated and ask after title corresponding to combination or numbering, click search and wait button generated data query statement.
As one embodiment of the present of invention, before step S102, described data query is set and combines corresponding numbering, described default data query instruction comprises that described data query combines corresponding numbering.In addition, also can name data query combination, by title, embody the feature of each data query combination.
In step S103, when described default data query instruction being detected, in presetting database, call the described data query associated with described default data query instruction and be combined into row data query.
When default data query instruction being detected, according to the data query comprising in data query instruction, be combined into row data query, particularly, by the numbering comprising in data query instruction, call the data query combination corresponding with it, the wherein value of each Related fields of usining is carried out data query in presetting database as key word.In the time need to repeatedly inquiring about identical content, by such inquiry mode, the numbering combining by data query is directly inquired about, and does not need user to re-enter the value of each field, has improved the efficiency of data query.
Further, when there is the combination of a plurality of data queries, more clearly know the value of the Related fields that data query combination comprises when making different users carry out data query, as one embodiment of the present of invention, as shown in Figure 2, can also comprise the following steps:
In S201, set up data query Assembly Listing, described data query Assembly Listing has comprised data query combination and corresponding numbering thereof described in each generation.
In S202, by described data query Assembly Listing, obtain described data query and combine corresponding numbering.
In S203, by described numbering, check the value of the Related fields that in described data query Assembly Listing, described data query combination corresponding to this numbering comprises.
User can check by data query Assembly Listing the value of the Related fields that data query combination comprises before inquiry, finds the data query that is applicable to self needss to combine.
Further, if do not find and self need duplicate data query combination, or when inquiring about close content, can on the basis of the data query combination having generated, modify and upgrade, and not need to reset.As one embodiment of the present of invention, after step S103, also comprise: upgrade the combination of described data query, described renewal comprises following at least one: revise, delete and add the field in described data query combination.
The mode of upgrading data query combination can have multiple: the value of Related fields in Update Table inquiry combination; Delete several fields in data query combination; In data query combination, add several fields and corresponding value thereof.
The operation of above-mentioned modification, deletion and increase field can carry out separately, carry out between two and also counter foil is capable, and the data query combination after renewal can be preserved by original title or numbering, also can rename and save as other combinations.
Further, in order to guarantee the security of data, all right: the user right that described data query is combined into row data query is set when improving search efficiency.
In embodiments of the present invention, the user right of above-mentioned data query combination is set, with this user right represent data query be combined in presetting database can range of application.For example, the corresponding total presetting database of Yi Ge company, company is divided into a plurality of tissues under it, in each tissue, there are some employees, every employee can belong to a plurality of different tissues again simultaneously, and the user right of data query combination can be divided into user class and tissue class, when the user right of data query combination is user class, represent that the combination of this data query can only be by this user for inquiring about the database of the arbitrary tissue under it, other users can not use; When the user right of data query combination is tissue class, represent that this data query combination can be by all employees in this tissue for inquiring about the database of the arbitrary tissue under it.
Fig. 3 shows the schematic diagram at the interface of the user right that field and data query combination are set, right side, interface is list of fields, have respectively: time of origin, event type, device type, device name, input after the value of each Related fields, clicking save button can combine in generated data inquiry, as the value of time of origin is set to " Dec 11 day to 2003 January of calendar year 2001 ", the value of event type is set to " delivery ", the value of device type is set to " car-mounted terminal ", the value of device name is set to " X1234 ", by the data query generating thus, combine, the related data of the car-mounted terminal that can to inquire the model sold in Time of Day section Dec 11 day to 2003 January of calendar year 2001 be X1234, left side, interface is data query combination user right choice box and data query Assembly Listing, in user right choice box, be set to user class or tissue class, data query Assembly Listing is listed the data query combination having generated, choosing wherein certain data query to combine and click delete button can delete this data query combination, click revise button can Update Table inquiry combination.
For the data query combination having generated, can be deleted by the user who creates or system manager, other users are without the authority of deleting data query combination.
In embodiments of the present invention, obtain N field and corresponding value thereof, generated data inquiry combination, set up the incidence relation of data query instruction and data query combination, the data query corresponding with it by this data query instruction calls combines, the value of N Related fields wherein comprising of usining is carried out data query in presetting database as key word, improved the efficiency while repeatedly inquiring about close or identical content.
Fig. 4 shows the structured flowchart of the data query device that the embodiment of the present invention two provides, and this device can be arranged in the system that database and search engine etc. need retrieve data, the data enquire method of describing for carrying out embodiment of the present invention Fig. 1 to Fig. 3.For convenience of explanation, only show the part relevant to the present embodiment.
With reference to Fig. 4, this device comprises:
The first acquiring unit 41, obtains N field and corresponding value thereof, generated data inquiry combination, and N is more than or equal to 1 integer.
First sets up unit 42, sets up the incidence relation of default data query instruction and data query combination.
Query unit 43 when default data query instruction being detected, is called the data query associated with default data query instruction and is combined into row data query in presetting database.
Alternatively, this device also comprises:
The first setting unit, arranges the user right that data query is combined into row data query.
Alternatively, this device also comprises:
Updating block, renewal data query combines, and upgrades and comprises following at least one: the field in modification, deletion and the combination of interpolation data query.
Alternatively, this device also comprises:
The second setting unit, arranges data query and combines corresponding numbering, and default data query instruction comprises that data query combines corresponding numbering.
Alternatively, this device also comprises:
Second sets up unit, sets up data query Assembly Listing, and data query Assembly Listing has comprised each data query combination and the corresponding numbering thereof having generated.
Second acquisition unit, by data query Assembly Listing, obtains data query and combines corresponding numbering.
Check unit, by numbering, check that in data query Assembly Listing, this numbers the value that corresponding data query combines the Related fields comprising.
In embodiments of the present invention, obtain N field and corresponding value thereof, generated data inquiry combination, set up the incidence relation of data query instruction and data query combination, the data query corresponding with it by this data query instruction calls combines, the value of N Related fields wherein comprising of usining is carried out data query in presetting database as key word, improved the efficiency while repeatedly inquiring about close or identical content.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a data enquire method, is characterized in that, described method comprises:
Obtain N field and corresponding value thereof, generated data inquiry combination, N is more than or equal to 1 integer;
Set up the incidence relation of default data query instruction and the combination of described data query;
When described default data query instruction being detected, in presetting database, call the described data query associated with described default data query instruction and be combined into row data query.
2. the method for claim 1, is characterized in that, described method also comprises:
The user right that described data query is combined into row data query is set.
3. the method for claim 1, is characterized in that, described method also comprises:
Upgrade the combination of described data query, described renewal comprises following at least one: revise, delete and add the field in described data query combination.
4. the method for claim 1, it is characterized in that, in described N field and the corresponding value thereof obtained, after generated data inquiry combination, before the incidence relation of the default data query instruction of described foundation and the combination of described data query, described method also comprises:
Described data query is set and combines corresponding numbering;
Described default data query instruction comprises that described data query combines corresponding numbering.
5. method as claimed in claim 4, is characterized in that, described method also comprises:
Set up data query Assembly Listing, described data query Assembly Listing has comprised data query combination and corresponding numbering thereof described in each generation;
By described data query Assembly Listing, obtain described data query and combine corresponding numbering;
By described numbering, check the value of the Related fields that in described data query Assembly Listing, described data query combination corresponding to this numbering comprises.
6. a data query device, is characterized in that, described device comprises:
The first acquiring unit, for obtaining N field and corresponding value thereof, generated data inquiry combination, N is more than or equal to 1 integer;
First sets up unit, for setting up the incidence relation of default data query instruction and the combination of described data query;
Query unit for when described default data query instruction being detected, is called the described data query associated with described default data query instruction and is combined into row data query in presetting database.
7. device as claimed in claim 6, is characterized in that, described device also comprises:
The first setting unit, for arranging the user right that described data query is combined into row data query.
8. device as claimed in claim 6, is characterized in that, described device also comprises:
Updating block, for upgrading the combination of described data query, described renewal comprises following at least one: revise, delete and add the field in described data query combination.
9. device as claimed in claim 6, is characterized in that, described device also comprises:
The second setting unit, combines corresponding numbering for described data query is set;
Described default data query instruction comprises that described data query combines corresponding numbering.
10. device as claimed in claim 9, is characterized in that, described device also comprises:
Second sets up unit, and for setting up data query Assembly Listing, described data query Assembly Listing has comprised data query combination and corresponding numbering thereof described in each generation;
Second acquisition unit, for by described data query Assembly Listing, obtains described data query and combines corresponding numbering;
Check unit, for check the value of the Related fields that described data query combination corresponding to this numbering of described data query Assembly Listing comprises by described numbering.
CN201310751022.7A 2013-12-31 2013-12-31 Method and device for querying data Pending CN103729448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310751022.7A CN103729448A (en) 2013-12-31 2013-12-31 Method and device for querying data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310751022.7A CN103729448A (en) 2013-12-31 2013-12-31 Method and device for querying data

Publications (1)

Publication Number Publication Date
CN103729448A true CN103729448A (en) 2014-04-16

Family

ID=50453522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310751022.7A Pending CN103729448A (en) 2013-12-31 2013-12-31 Method and device for querying data

Country Status (1)

Country Link
CN (1) CN103729448A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550270A (en) * 2015-12-09 2016-05-04 百度在线网络技术(北京)有限公司 Database inquiry method and device
CN106649360A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data repeatability check method and apparatus
CN109710674A (en) * 2018-12-26 2019-05-03 重庆誉存大数据科技有限公司 A kind of rule engine system of semi-structured text data and preposition cut-in method
CN110019544A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Data query method and system
CN110704872A (en) * 2019-09-24 2020-01-17 天津卓朗科技发展有限公司 Data query method and device, electronic equipment and computer readable storage medium
CN111414377A (en) * 2020-03-05 2020-07-14 微民保险代理有限公司 Method and device for processing structured query statement and storage medium
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment
CN113282631A (en) * 2020-02-20 2021-08-20 上海哔哩哔哩科技有限公司 Method and equipment for determining target user based on user portrait data

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649360A (en) * 2015-10-30 2017-05-10 北京国双科技有限公司 Data repeatability check method and apparatus
CN105550270A (en) * 2015-12-09 2016-05-04 百度在线网络技术(北京)有限公司 Database inquiry method and device
CN105550270B (en) * 2015-12-09 2019-07-12 百度在线网络技术(北京)有限公司 Data base query method and device
CN110019544A (en) * 2017-09-30 2019-07-16 北京国双科技有限公司 Data query method and system
CN109710674A (en) * 2018-12-26 2019-05-03 重庆誉存大数据科技有限公司 A kind of rule engine system of semi-structured text data and preposition cut-in method
CN110704872A (en) * 2019-09-24 2020-01-17 天津卓朗科技发展有限公司 Data query method and device, electronic equipment and computer readable storage medium
CN110704872B (en) * 2019-09-24 2021-08-10 天津卓朗科技发展有限公司 Data query method and device, electronic equipment and computer readable storage medium
CN113282631A (en) * 2020-02-20 2021-08-20 上海哔哩哔哩科技有限公司 Method and equipment for determining target user based on user portrait data
CN111414377A (en) * 2020-03-05 2020-07-14 微民保险代理有限公司 Method and device for processing structured query statement and storage medium
CN111414377B (en) * 2020-03-05 2023-10-24 微民保险代理有限公司 Method, device and storage medium for processing structured query statement
CN112685445A (en) * 2020-12-29 2021-04-20 杭州旷云金智科技有限公司 Data query method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN103729448A (en) Method and device for querying data
US9195707B2 (en) Distributed event system for relational models
CN105138592B (en) A kind of daily record data storage and search method based on distributed structure/architecture
CN108197237B (en) Visual data acquisition and display system
CN101364240B (en) Metadata management method and device
CN105989076A (en) Data statistical method and device
AU2012271083A1 (en) Enriching database query responses using data from external data sources
US11228646B2 (en) Systems and methods for generating, deploying, and managing data infrastructure stacks
CA2838500A1 (en) Enriching database query responses using data from external data sources
CN108268529B (en) Data summarization method and system based on business abstraction and multi-engine scheduling
CN107506383B (en) Audit data processing method and computer equipment
CN106126569A (en) A kind of rapid data method of servicing and system
US9374475B1 (en) System for processing customer records
CN111818175B (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN106250303A (en) Business diary collection and early warning system and business diary collection and method for early warning
CN106687955A (en) Simplifying invocation of import procedures to transfer data from data sources to data targets
CN110781183A (en) Method and device for processing incremental data in Hive database and computer equipment
CN111047434B (en) Operation record generation method and device, computer equipment and storage medium
CN105975489A (en) Metadata-based online SQL code completion method
CN103218437A (en) Method and system for inquiring information of mobile terminal
CN1869977A (en) Retrieval system and method
CN114443015A (en) Method for generating adding, deleting, modifying and checking service interface based on database metadata
CN106708946A (en) Universal API table query method
CN102402515A (en) General custom query system and method
US20120254132A1 (en) Enhanced Contact Information

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: 20140416