CN107315782A - A kind of data query method and device - Google Patents

A kind of data query method and device Download PDF

Info

Publication number
CN107315782A
CN107315782A CN201710428423.7A CN201710428423A CN107315782A CN 107315782 A CN107315782 A CN 107315782A CN 201710428423 A CN201710428423 A CN 201710428423A CN 107315782 A CN107315782 A CN 107315782A
Authority
CN
China
Prior art keywords
information
checked
type
index
database
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
CN201710428423.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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710428423.7A priority Critical patent/CN107315782A/en
Publication of CN107315782A publication Critical patent/CN107315782A/en
Pending legal-status Critical Current

Links

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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • 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/22Indexing; Data structures therefor; Storage structures
    • 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/2455Query execution
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0242Determining effectiveness of advertisements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computational Linguistics (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiments of the invention provide a kind of data query method and device, in this method, the type of the index to be checked, information to be checked and the information to be checked of targeted customer's input is at least obtained;Based on the information to be checked, the type of the information to be checked, the index to be checked and the database pre-established, inquire about the corresponding desired value of the index to be checked, wherein, the corresponding relation for Query Information, the type of Query Information, inquiry index and the desired value of being at least stored with the database;Export Query Result.In the embodiment of the present invention, data are inquired about by way of inquiring about database, query time is reduced, the step of simplifying data query improves the convenience of inquiry data.

Description

A kind of data query method and device
Technical field
The present invention relates to data query technique field, more particularly to a kind of data query method and device.
Background technology
At present, for a vendible project, developer and sales force are generally there are, developer is responsible for project Exploitation and project information management, sales force is responsible for item sale, and therefore, sales force generally requires the letter to project The inquiry into row index is ceased, to know that project is delivered to the effect obtained in market, to carry out follow-up sale, for example: Information is video ads data, then index can be click volume, playback volume etc..
Sales force is directed to, existing data query mode there are two kinds:One kind seeks help from developer for sales force, Data query is carried out using program code by developer, and data query result is informed into sales force;Another is exploitation How personnel's teaching sales force carries out data query using program code, then carries out data query by sales force.
Because the information in current vendible project is stored in multiple data sheets, and between each data sheet In the absence of incidence relation, wherein, data sheet includes index and information report, index and information attribute form etc., therefore no matter It is that data query is carried out by developer, or developer teaching sales force carries out the mode of data query, the step of inquiry It is rapid complex, it is necessary to take considerable time, therefore, existing data query mode causes to inquire about the inconvenience of data.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of data query method and device, to simplify data query step, Improve the convenience of inquiry data.Concrete technical scheme is as follows:
A kind of data query method, methods described includes:
At least obtain the type of the index to be checked, information to be checked and the information to be checked of targeted customer's input;
Based on the information to be checked, the type of the information to be checked, the index to be checked and pre-establish Database, inquires about the corresponding desired value of the index to be checked, wherein, the Query Information that is at least stored with the database, look into Ask the corresponding relation of the type, inquiry index and desired value of information;
Export Query Result.
Optionally, the index to be checked at least obtaining targeted customer's input, information to be checked and described to be checked The step of type of information, including:
Obtain the index to be checked of targeted customer's input;
Based on the index to be checked, corresponding reference Query Information is shown;
The information to be checked that the targeted customer clicks on is obtained, the type of the information to be checked is determined.
Optionally, the process for setting up the database is:
Obtain multiple reference informations;
The type of each reference information is identified, and determines the corresponding inquiry index of each reference information;
Each reference information is counted under the type identified, the desired value of corresponding inquiry index;
The corresponding relation of the type, inquiry index and desired value of each reference information is preserved in database.
Optionally, it is corresponding with desired value in the type that each reference information is preserved in database, inquiry index Before the step of relation, methods described also includes:
Obtain the account information of multiple users;
Type based on the account information of each user and each reference information, determines the search access right of each user;
The step of the corresponding relation of the type that each reference information is preserved in database, inquiry index and desired value Suddenly, including:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each are preserved in database The corresponding relation of the type of the account information of user, search access right and each reference information.
Optionally, be also stored with the database user account information, search access right and Query Information type Corresponding relation, it is described based on the information to be checked, the type of the information to be checked, the index to be checked and in advance Before the database of foundation, the step of inquiring about the index to be checked corresponding desired value, methods described also includes:
Obtain the target account information of the targeted customer;
The target account information is contrasted with the database pre-established, the target account information is determined Corresponding target query authority;
Based on the target query authority, the type of the information to be checked and the database pre-established, institute is judged State targeted customer and whether have permission and the information to be checked is inquired about, described the letter to be checked is based on if it is, performing Breath, the type of the information to be checked, the index to be checked and the database pre-established, inquire about the inquiry index pair The step of desired value answered.
A kind of data query arrangement, described device includes:
Acquisition module, index to be checked, information to be checked and described to be checked at least obtaining targeted customer's input Ask the type of information;
Enquiry module, for based on the information to be checked, the type of the information to be checked, the index to be checked with And the database pre-established, the corresponding desired value of the index to be checked is inquired about, wherein, at least it is stored with the database Query Information, the type of Query Information, the corresponding relation for inquiring about index and desired value;
Output module, for exporting Query Result.
Optionally, the acquisition module, including:
Index selection unit to be checked, the index to be checked for obtaining targeted customer's input;
Display unit, for based on the index to be checked, showing corresponding reference Query Information;
Determining unit, for obtaining the information to be checked that the targeted customer clicks on, determines the class of the information to be checked Type.
Optionally, described device also includes setting up module, and the module of setting up is used to set up the database, the foundation Module, including:
Reference information obtaining unit, for obtaining multiple reference informations;
Recognition unit, for identifying the type of each reference information, and determines that the corresponding inquiry of each reference information refers to Mark;
Statistic unit, for counting each reference information under the type identified, the index of corresponding inquiry index Value;
Storage unit, type, the inquiry index for preserving each reference information in database is corresponding with desired value Relation.
Optionally, described device also includes:
First account information obtains module, in the type that each reference information is preserved in database, inquiry Before the corresponding relation of index and desired value, the account information of multiple users is obtained;
First search access right determining module, for the class based on the account information of each user and each reference information Type, determines the search access right of each user;
The storage unit, specifically for:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each are preserved in database The corresponding relation of the type of the account information of user, search access right and each reference information.
Optionally, described device also includes:
Second account information obtains module, in the class based on the information to be checked, the information to be checked Type, the index to be checked and the database pre-established, inquire about before the corresponding desired value of the index to be checked, obtain The target account information of the targeted customer;
Second search access right determining module, for the target account information to be carried out with the database pre-established Contrast, determines the corresponding target query authority of the target account information, wherein, the account for the user that is also stored with the database The corresponding relation of the type of number information, search access right and Query Information;
Judge module, for based on the target query authority, the type of the information to be checked and pre-establishing Database, judges whether the targeted customer has permission and the information to be checked is inquired about, if it is, the triggering inquiry Module.
Another aspect, the embodiment of the present invention additionally provides a kind of computer-readable recording medium, described computer-readable to deposit Be stored with instruction in storage media, when run on a computer so that computer performs any of the above-described described method.
Another aspect, the embodiment of the present invention additionally provides a kind of computer program product for including instruction, when it is being calculated When being run on machine so that computer performs any of the above-described described method.
In the embodiment of the present invention, index to be checked, the information to be checked and to be checked of targeted customer's input are at least obtained The type of information, is then based on the type of index to be checked, information to be checked and information to be checked, from the data pre-established The corresponding desired value of index to be checked is inquired about in storehouse, and exports Query Result, thus, to data by way of inquiring about database Inquired about, reduce query time, the step of simplifying data query improves the convenience of inquiry data.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described.
Fig. 1 is the first schematic flow sheet of data query method provided in an embodiment of the present invention;
Fig. 2 is the first schematic flow sheet provided in an embodiment of the present invention for setting up database;
Fig. 3 is second of schematic flow sheet provided in an embodiment of the present invention for setting up database;
Fig. 4 is second of schematic flow sheet of data query method provided in an embodiment of the present invention;
Fig. 5 is the structural representation of data query arrangement provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is described.
For convenience user can fast and effectively queried for items related data, the embodiment of the present invention pre-establishes A kind of database, the database is pre-configured with to the existing data related to project so that in the database at least The corresponding relation for the Query Information related to project, the type of Query Information, inquiry index and the desired value of being stored with.
Due to being inquired about using database, simple to operate and inquiry convenience, therefore the present invention is by inquiring about database Mode is inquired about the related data of project so that either using the professional user of database, or domestic consumer, all may be used Fast and effectively to obtain relevant query result by database provided in an embodiment of the present invention and inquiry mode.
In order to solve prior art problem, the embodiments of the invention provide a kind of data query method and device.
A kind of data query method provided first below the embodiment of the present invention is introduced.
As shown in figure 1, a kind of data query method provided in an embodiment of the present invention, can include:
S101:At least obtain the type of the index to be checked, information to be checked and information to be checked of targeted customer's input.
When targeted customer need carry out data query when, can input the index to be checked to be inquired about, information to be checked with And the type of information to be checked, thus, you can obtain index to be checked, the information to be checked and to be checked of targeted customer's input The type of information, subsequently to be inquired about.
Because the type of the index to be checked, information to be checked and information to be checked that obtain targeted customer's input has a variety of Mode, is introduced in detail below:
First way:
Targeted customer directly inputs index to be checked and information to be checked, thus, you can obtains targeted customer and is inputted Index to be checked, information to be checked, be then based on the information to be checked that targeted customer inputted and determine the information to be checked Type, its process is:
Obtain the index to be checked and information to be checked of targeted customer's input;
Determine the type of information to be checked.
For example:Targeted customer will inquire about the clicking rate of A brand video ads, wherein, index to be checked is clicking rate, to be checked Inquiry information is video ads A, and the type of information to be checked is brand advertising;
Targeted customer directly inputs video ads A clicking rate to be inquired about, thus, determines what targeted customer was inputted Video ads A type is brand advertising.
The second way:Targeted customer first inputs index to be checked, then again based on shown information to be checked, selection The information to be checked to be inquired about, thus, it is possible to determine the information to be checked based on the selected information to be checked of targeted customer Type, its process is:
Obtain the index to be checked of targeted customer's input;
Based on index to be checked, corresponding reference Query Information is shown;
The information to be checked that user clicks on is obtained, the type of information to be checked is determined.
For example:User will inquire about the clicking rate of A brand video ads, wherein, index to be checked is clicking rate, letter to be checked Cease for video ads A, the type of information to be checked is brand advertising;
User inputs on clicking rate, interface and shows the corresponding reference Query Information video ads A of clicking rate and video first Advertisement B, then, user click on video ads A to be inquired about, finally, obtain video ads A, and determine video ads A's Type is brand advertising.
S102:Based on information to be checked, the type of information to be checked, index to be checked and the database pre-established, Inquire about the corresponding desired value of index to be checked.
Due to being inquired about using database, convenient and efficiency high is inquired about, therefore, in order that user easily carries out data Inquiry, has pre-established the corresponding relation of the Query Information that is at least stored with, the type of Query Information, inquiry index and desired value Database.
At least obtaining the type for treating index to be checked, information to be checked and information to be checked of targeted customer's input Afterwards, you can data query is carried out by database.
In a kind of implementation of the present invention, as shown in Fig. 2 the process for setting up database is:
S1021:Obtain multiple reference informations;
In order to set up database, it is necessary to obtain multiple reference informations, wherein, the reference information is involved by vendible project And field information, for example:Assuming that field involved by vendible project is video ads field, then reference information be regarding Frequency advertisement;Assuming that the field involved by vendible project is video novel field, then reference information is novel.
Because the mode for obtaining multiple reference informations has a variety of, introduce in detail below:
First way:
Obtain vendible project put goods on the market and in the market operation preset time period after multiple reference informations.
For example:Assuming that the information that vendible project puts goods on the market is A brand advertising and the non-brand advertising of B, market is many Individual website, preset time period is 1 month, then after A brand advertising and the non-brand advertising of B are run 1 month in each website, obtains Obtain A brand advertising and the non-brand advertising of B.
The second way:
Obtain multiple reference informations in multiple data sheets in vendible project.
Because the information in existing vendible project is stored in multiple data sheets, it therefore, it can directly from many Multiple reference informations are directly obtained in individual data sheet.
S1022:The type of each reference information is identified, and determines the corresponding inquiry index of each reference information.
After multiple reference informations are obtained, in order to set up database, it is necessary to identify the type of each reference information, and Determine the corresponding inquiry index of each reference information.
For example:Reference information is video ads, then type can be brand advertising, non-brand advertising etc..
Due to determining that the mode of the corresponding inquiry index of each reference information has a variety of, introduce in detail below:
First way:
The field belonging to each reference information is determined, the corresponding inquiry index of each reference information is determined.
For example:Assuming that each reference information includes video ads A and video ads B, due to video ads A and video ads B belongs to advertisement field, and advertisement has after putting goods on the market in playback volume or clicking rate, hence, it can be determined that video is wide It can be playback volume or clicking rate to accuse the corresponding inquiry indexs of A, determine that the corresponding inquiry indexs of video ads B can be playback volume Or clicking rate.
The second way:
Based on the data sheet where each reference information, the corresponding inquiry index of each reference information is determined.
Because existing data sheet is counted the data of each reference information, for example:Data sheet includes Index and information report, index and information attribute form etc., therefore, based on the data sheet where each reference information, so that it may Determine the corresponding inquiry index of each reference information.
S1023:Each reference information is counted under the type identified, the desired value of corresponding inquiry index.
The type of each reference information is being identified, and is being determined after the corresponding inquiry index of each reference information, for Each reference information, can calculate the reference information under the type identified, corresponding inquiry by way of statistics The desired value of index.
For example:Assuming that each reference information includes video ads A and video ads B, video ads A type is wide for brand Accuse, video ads B type is non-brand advertising, and video ads A inquiry index is playback volume and clicking rate, video ads B Inquiry index be playback volume and clicking rate;
The broadcasting value for counting the corresponding playback volumes of brand video ads A is 2000, and, statistics brand video ads A The clicking rate value of corresponding clicking rate is 20%;
The broadcasting value 3000 of the corresponding playback volumes of non-brand video ads B is counted, and, count non-brand video ads The clicking rate value of the corresponding clicking rates of B is 30%.
S1024:The corresponding relation of the type, inquiry index and desired value of each reference information is preserved in database.
Each reference information is being counted under the type identified, after the desired value of corresponding inquiry index, is being built The corresponding relation of the type, inquiry index and desired value of each reference information is found, and the corresponding relation is preserved to database, by This, completes the foundation of database.
For example:S1023 example is accepted, database is set up as shown in the table:
Wherein, the database can be Mysql Relational DBMSs, detailed, included by database The design method of each table is as follows, and each table is according to the field option and installment in database, and the query interface of design standard, Selected from the field in each table, and support SQL (the Structured Query Language, structuralized query of standard Language):
1st, data word segment table:
2nd, tables of data:
Row name Type Description
id bigint From the unique ID of increasing
name varchar(255) The title of tables of data
description varchar(255) Tables of data is described
3rd, which field is specifically included in the contingency table of tables of data and field list, configuration data table:
Row name Type Description
table_id bigint Tables of data ID
field_id bigint Data field ID
4th, index table is inquired about.When inquiring about the index of tables of data, increase expression solution is supported, it is possible to which configuration is each Plant the operator of converging operation.
5th, query type table:
Row name Type Description
id bigint From the unique ID of increasing
name varchar(255) The title of type list
description varchar(255) Type list is described
6th, the index used in query type coupling index table, Configuration Type:
Row name Type Description
function_id bigint Type ID
metric_id bigint Index ID
So that reference information is video ads as an example, user does not also need to know each video ads in different cities or not sometimes , therefore,, can be with before Fig. 2 steps S1023 in another implementation of the present invention with the clicking rate in the period Including:
Determine the corresponding querying condition of each reference information;
S1023:Each reference information is counted under the type and identified querying condition identified, it is corresponding to look into Ask the desired value of index.
S1024:Pair of type, querying condition, inquiry index and the desired value of each reference information is preserved in database It should be related to.
Identifying the type of each reference information, and after determining the corresponding inquiry index of each reference information, can be with The corresponding querying condition of each reference information is determined, wherein, querying condition can be city, period etc..
Then each reference information is counted under the type and identified querying condition identified, corresponding inquiry The desired value of index.
The corresponding relation of type, querying condition, inquiry index and the desired value of each reference information is finally set up, and should Corresponding relation is preserved to database, thus, completes the foundation of database.
For example:Accept S1023 example, it is assumed that querying condition is city, it is assumed that brand video ads A is in city H and city The broadcasting value of city I playback volume is 1000, and in city, the clicking rate value of H and city I clicking rate is 10%;Non- brand Video ads B is 1000 in the broadcasting value of city H playback volume, and in city, the broadcasting value of I playback volume is 2000, in city The clicking rate value of city H clicking rate is 10%, and in city, the clicking rate value of I clicking rate is 20%, then sets up database as follows Shown in table:
Wherein, the database can be Mysql Relational DBMSs, detailed, in Fig. 2 Mysql data On the basis of the design method for each table that place includes, it can also include:
7th, the condition used in query type Correlation Criteria table, Configuration Type:
Row name Type Description
function_id bigint Type ID
field_id bigint Field ID
Type, querying condition, inquiry index and the index of each reference information are stored in the database pre-established In the case of the corresponding relation of value, accordingly, the S101 and S102 of the data query method that Fig. 1 of the present invention is provided also accordingly change Become, be specially:
S101:Obtain the index to be checked, information to be checked, the type of information to be checked and to be checked of targeted customer's input Inquiry condition;
S102:Based on condition to be checked, the type of information to be checked, index to be checked and the database pre-established, Inquire about the corresponding desired value of index to be checked.
Wherein, index to be checked, information to be checked, the type of information to be checked and the querying condition of user's input are obtained Mode have a variety of, introduce in detail below:
First way:
User directly inputs index to be checked, information to be checked and condition to be checked, thus, you can obtain user institute defeated Index to be checked, information to be checked and the condition to be checked entered, being then based on that the information to be checked that user inputted determines should The type of information to be checked, its process is:
Obtain index to be checked, information to be checked and the condition to be checked of user's input;
Determine the type of information to be checked.
For example:User will inquire about clicking rate of the A brands video ads in city H, wherein, index to be checked is clicking rate, Information to be checked is video ads A, and condition to be checked is city H, and the type of information to be checked is brand advertising;
User directly inputs clicking rates of the video ads A in city H to be inquired about, and thus, determines what user was inputted Video ads A type is brand advertising.
The second way:User first inputs index to be checked, then again based on shown reference Query Information and ginseng Querying condition is examined, the information to be checked and corresponding condition to be checked to be inquired about is selected, finally, can be based on selected by user The information to be checked selected determines the type of the information to be checked, and its process is:
Obtain the index to be checked of user's input;
Based on index to be checked, show corresponding reference Query Information and refer to querying condition;
Information to be checked and condition to be checked that user clicks on are obtained, and determines the type of information to be checked.
For example:User will inquire about clicking rate of the A brands video ads in city H, wherein, index to be checked is clicking rate, Information to be checked is video ads A, and condition to be checked is city H, and the type of information to be checked is brand advertising;
User inputs on clicking rate, interface and shows that the corresponding reference Query Information video ads A of clicking rate, video are wide first B is accused, and, with reference to querying condition city H, city I, then, user clicks on video ads A and city H to be inquired about, most Afterwards, video ads A and city H is obtained, and determines video ads A type for brand advertising.
Further, since need to carry out the interior employee of company generally where project of data query, therefore, because some Data have confidentiality, accordingly, it would be desirable to be set to search access right, to improve the security of inquiry data, therefore, at this In another implementation of invention, referring to Fig. 3, wherein, step S1021-S1023 is identical with Fig. 2, in Fig. 3 steps S1024 Before, it can also include:
S1024A:Obtain the account information of multiple users.
In order to improve the security of data query, it is necessary to obtain the account information of multiple users, wherein, the plurality of user is The employee of company where project, account information can be account and password.
S1024B:Type based on the account information of each user and each reference information, determines looking into for each user Ask authority.
After the account information of multiple users is obtained, can the type based on each reference information, each user is set Search access right, for example:User is higher in the rank of company, then can all types of information be carried out with data query, or, certain Some users can only carry out data query to a certain certain types of information.
Step S1024 in Fig. 3, can include:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each are preserved in database The corresponding relation of the type of the account information of user, search access right and each reference information.
It is determined that after the search access right of each user, not only need to preserve in database the type of each reference information, Inquire about the corresponding relation of index and desired value, in addition it is also necessary to which the account information, search access right and each reference for setting up each user are believed The corresponding relation of the type of breath, and be stored in database.
For example:Accept the example of S1023 in Fig. 2, it is assumed that there are user 1 and user 2, the account information of user 1 is L, is used The account information at family 2 is S, and the search access right for determining user 1 is O, and the search access right of user 2 is P, wherein, search access right O is only Non- brand advertising can be inquired about, search access right P sets up the following two tables institute of database for that can inquire about brand advertising and non-brand advertising Show:
Wherein, the database can be Mysql Relational DBMSs, detailed, in Fig. 2 Mysql data On the basis of the design method for each table that place includes, it can also include:
8th, user account information table, be the user name of user's distribution, password and QPS (Query Per Second, it is per second to look into Inquiry rate) etc. information.
Row name Type Description
id bigint From the unique ID of increasing
name varchar(255) User name
password varchar(255) User cipher
qps int User inquires about QPS
description varchar(255) User describes
9th, user's search access right table, configuration user possesses authority
Row name Type Description
user_id bigint ID
function_id bigint Type ID
In addition, the present invention another implementation in, can also set up both stored each reference information type, Inquire about the corresponding relation of index, querying condition and desired value, store again the account information of each user, search access right and each The database of the corresponding relation of the type of reference information, it is similar to the above process specifically to set up process, will not be repeated here.
Type, inquiry the index pass corresponding with desired value of each reference information are stored in the database pre-established System, and the account information of each user, search access right and each reference information type corresponding relation in the case of, accordingly , the data query method that Fig. 1 of the present invention is provided also accordingly changes, referring specifically to Fig. 4, wherein, step S101-S103 with figure 1 is identical, before Fig. 1 steps S102, can also include:
S102A:Obtain the target account information of targeted customer.
Used to determine whether the targeted customer for carrying out data query has permission progress data query, it is necessary to obtain the target The target account information at family.
S102B:Target account information and the database that pre-establishes are contrasted, determine that target account information is corresponding Target query authority.
After the target account information of targeted customer is obtained, you can target account information and the database that pre-establishes are entered Row contrast, determines the corresponding target query authority of target account information.
For example:Accept the example of S1024 in Fig. 3, it is assumed that the target account information of targeted customer is L;
Then by the account information of each user in target account information L and the database that pre-establishes, search access right with The corresponding relation of the type of each reference information is contrasted, and it is O to determine the corresponding target query authorities of target account information L.
S102C:Based on target query authority, the type of information to be checked and the database pre-established, user is judged Whether have permission and treat Query Information and inquired about, if it is, step S102 is performed, if it is not, then without any processing.
, it is necessary to the class based on target query authority, information to be checked after the target query authority of targeted customer is determined Type and the database pre-established, judge whether targeted customer can treat Query Information and be inquired about, if it is then entering Row data query.
For example:Accept S102B example, it is assumed that target query authority is clicking rate, and the type of information to be checked is brand Advertisement;
Then understand that targeted customer only inquires about non-brand advertising based on the target query authority O of identified targeted customer, And the type of information to be checked is brand advertising, so targeted customer cannot treat Query Information and be inquired about.
S103:Export Query Result.
After the corresponding desired value of index to be checked is inquired, the desired value is exported.
In the embodiment of the present invention, index to be checked, the information to be checked and to be checked of targeted customer's input are at least obtained The type of information, is then based on the type of index to be checked, information to be checked and information to be checked, from the data pre-established The corresponding desired value of index to be checked is inquired about in storehouse, and exports Query Result, thus, to data by way of inquiring about database Inquired about, reduce query time, the step of simplifying data query improves the convenience of inquiry data.
Further, since in the embodiment of the present invention, storing data in database, when there are new data, you can straight Connect and update the data storehouse, without manually being calculated, reduce the workload of developer, and, because existing data sheet is protected Exist in the corresponding configuration file of project so that every time during restarting server, be required to pick up project, then find pair The configuration file answered, is then operated again, and in the embodiment of the present invention, only needs directly to operate database, is kept away Exempt to restart influence of the server to inquiry operation.
Relative to above method embodiment, as shown in figure 5, the embodiment of the present invention additionally provides a kind of data query arrangement, Described device can include:
Acquisition module 501, at least obtaining the index to be checked of targeted customer's input, information to be checked and described treating The type of Query Information;
Enquiry module 502, for based on the information to be checked, the type of the information to be checked, the finger to be checked The database for being marked with and pre-establishing, inquires about the corresponding desired value of the index to be checked, wherein, at least deposited in the database Contain the corresponding relation of Query Information, the type of Query Information, inquiry index and desired value;
Output module 503, for exporting Query Result.
In the embodiment of the present invention, index to be checked, the information to be checked and to be checked of targeted customer's input are at least obtained The type of information, is then based on the type of index to be checked, information to be checked and information to be checked, from the data pre-established The corresponding desired value of index to be checked is inquired about in storehouse, and exports Query Result, thus, to data by way of inquiring about database Inquired about, reduce query time, the step of simplifying data query improves the convenience of inquiry data.
In one implementation, the acquisition module 501, can include:
Index selection unit to be checked, the index to be checked for obtaining targeted customer's input;
Display unit, for based on the index to be checked, showing corresponding reference Query Information;
Determining unit, for obtaining the information to be checked that the targeted customer clicks on, determines the class of the information to be checked Type.
In one implementation, described device can also include setting up module, and the module of setting up is used to set up described Database, it is described to set up module, it can include:
Reference information obtaining unit, for obtaining multiple reference informations;
Recognition unit, for identifying the type of each reference information, and determines that the corresponding inquiry of each reference information refers to Mark;
Statistic unit, for counting each reference information under the type identified, the index of corresponding inquiry index Value;
Storage unit, type, the inquiry index for preserving each reference information in database is corresponding with desired value Relation.
In one implementation, described device can also include:
First account information obtains module, in the type that each reference information is preserved in database, inquiry Before the corresponding relation of index and desired value, the account information of multiple users is obtained;
First search access right determining module, for the class based on the account information of each user and each reference information Type, determines the search access right of each user;
The storage unit, specifically for:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each are preserved in database The corresponding relation of the type of the account information of user, search access right and each reference information.
In one implementation, described device can also include:
Second account information obtains module, in the class based on the information to be checked, the information to be checked Type, the index to be checked and the database pre-established, inquire about before the corresponding desired value of the index to be checked, obtain The target account information of the targeted customer;
Second search access right determining module, for the target account information to be carried out with the database pre-established Contrast, determines the corresponding target query authority of the target account information, wherein, the account for the user that is also stored with the database The corresponding relation of the type of number information, search access right and Query Information;
Judge module, for based on the target query authority, the type of the information to be checked and pre-establishing Database, judges whether the targeted customer has permission and the information to be checked is inquired about, if it is, the triggering inquiry Module 502.
In the another embodiment that the present invention is provided, a kind of computer-readable recording medium is additionally provided, the computer can The instruction that is stored with storage medium is read, when run on a computer so that computer performs any institute in above-described embodiment The method stated.
In the another embodiment that the present invention is provided, a kind of computer program product for including instruction is additionally provided, when it When running on computers so that computer performs any of the above-described described method.
In the above-described embodiments, it can come real wholly or partly by software, hardware, firmware or its any combination It is existing.When implemented in software, it can realize in the form of a computer program product whole or in part.The computer program Product includes one or more computer instructions.When loading on computers and performing the computer program instructions, all or Partly produce according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer-readable recording medium In, or the transmission from a computer-readable recording medium to another computer-readable recording medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, numeral from web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another web-site, computer, server or Data center is transmitted.The computer-readable recording medium can be any usable medium that computer can be accessed or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disc Solid State Disk (SSD)) etc..
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of data query method, it is characterised in that methods described includes:
At least obtain the type of the index to be checked, information to be checked and the information to be checked of targeted customer's input;
Based on the information to be checked, the type of the information to be checked, the index to be checked and the data pre-established Storehouse, inquires about the corresponding desired value of the index to be checked, wherein, the Query Information that is at least stored with the database, inquiry letter The type of breath, the corresponding relation for inquiring about index and desired value;
Export Query Result.
2. according to the method described in claim 1, it is characterised in that the finger to be checked at least obtaining targeted customer's input The step of type of mark, information to be checked and the information to be checked, including:
Obtain the index to be checked of targeted customer's input;
Based on the index to be checked, corresponding reference Query Information is shown;
The information to be checked that the targeted customer clicks on is obtained, the type of the information to be checked is determined.
3. method according to claim 1 or 2, it is characterised in that the process for setting up the database is:
Obtain multiple reference informations;
The type of each reference information is identified, and determines the corresponding inquiry index of each reference information;
Each reference information is counted under the type identified, the desired value of corresponding inquiry index;
The corresponding relation of the type, inquiry index and desired value of each reference information is preserved in database.
4. method according to claim 3, it is characterised in that in the class that each reference information is preserved in database Before the step of corresponding relation of type, inquiry index and desired value, methods described also includes:
Obtain the account information of multiple users;
Type based on the account information of each user and each reference information, determines the search access right of each user;
The step of corresponding relation of the type that each reference information is preserved in database, inquiry index and desired value, bag Include:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each user are preserved in database Account information, the corresponding relation of the type of search access right and each reference information.
5. method according to claim 4, it is characterised in that the account information for the user that is also stored with the database, The corresponding relation of search access right and the type of Query Information, described based on the information to be checked, the information to be checked Type, the index to be checked and the database pre-established, the step of inquiring about the index to be checked corresponding desired value Before, methods described also includes:
Obtain the target account information of the targeted customer;
The target account information is contrasted with the database pre-established, the target account information correspondence is determined Target query authority;
Based on the target query authority, the type of the information to be checked and the database pre-established, the mesh is judged Whether mark user, which has permission, is inquired about the information to be checked, if it is, performing described based on the information to be checked, institute The type, the index to be checked and the database pre-established of information to be checked are stated, the inquiry index is inquired about corresponding The step of desired value.
6. a kind of data query arrangement, it is characterised in that described device includes:
Acquisition module, index to be checked, information to be checked and the letter to be checked at least obtaining targeted customer's input The type of breath;
Enquiry module, for based on the information to be checked, the type of the information to be checked, the index to be checked and pre- The database first set up, inquires about the corresponding desired value of the index to be checked, wherein, be at least stored with inquiry in the database Information, the type of Query Information, the corresponding relation for inquiring about index and desired value;
Output module, for exporting Query Result.
7. device according to claim 6, it is characterised in that the acquisition module, including:
Index selection unit to be checked, the index to be checked for obtaining targeted customer's input;
Display unit, for based on the index to be checked, showing corresponding reference Query Information;
Determining unit, for obtaining the information to be checked that the targeted customer clicks on, determines the type of the information to be checked.
8. the device according to claim 6 or 7, it is characterised in that described device also includes setting up module, described to set up mould Block is used to set up the database, described to set up module, including:
Reference information obtaining unit, for obtaining multiple reference informations;
Recognition unit, for identifying the type of each reference information, and determines the corresponding inquiry index of each reference information;
Statistic unit, for counting each reference information under the type identified, the desired value of corresponding inquiry index;
Storage unit, the corresponding relation of type, inquiry index and desired value for preserving each reference information in database.
9. device according to claim 8, it is characterised in that described device also includes:
First account information obtains module, in the type that each reference information is preserved in database, inquiry index Before the corresponding relation of desired value, the account information of multiple users is obtained;
First search access right determining module, for the type based on the account information of each user and each reference information, really The search access right of each fixed user;
The storage unit, specifically for:
The corresponding relation of the type, inquiry index and desired value of each reference information, and each user are preserved in database Account information, the corresponding relation of the type of search access right and each reference information.
10. device according to claim 9, it is characterised in that described device also includes:
Second account information obtain module, for described based on the information to be checked, the type of the information to be checked, institute Index to be checked and the database pre-established are stated, inquires about before the corresponding desired value of the index to be checked, obtains described The target account information of targeted customer;
Second search access right determining module, for the target account information and the database that pre-establishes to be carried out pair Than, the corresponding target query authority of the target account information is determined, wherein, the account for the user that is also stored with the database The corresponding relation of the type of information, search access right and Query Information;
Judge module, for based on the target query authority, the type of the information to be checked and the data pre-established Storehouse, judges whether the targeted customer has permission and the information to be checked is inquired about, if it is, triggering the inquiry mould Block.
CN201710428423.7A 2017-06-08 2017-06-08 A kind of data query method and device Pending CN107315782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710428423.7A CN107315782A (en) 2017-06-08 2017-06-08 A kind of data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710428423.7A CN107315782A (en) 2017-06-08 2017-06-08 A kind of data query method and device

Publications (1)

Publication Number Publication Date
CN107315782A true CN107315782A (en) 2017-11-03

Family

ID=60183575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710428423.7A Pending CN107315782A (en) 2017-06-08 2017-06-08 A kind of data query method and device

Country Status (1)

Country Link
CN (1) CN107315782A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763300A (en) * 2018-04-19 2018-11-06 北京奇艺世纪科技有限公司 A kind of data query method and device
CN108846015A (en) * 2018-05-04 2018-11-20 平安科技(深圳)有限公司 Real estate information query method, device, computer equipment and storage medium
CN109146397A (en) * 2018-06-29 2019-01-04 深圳市彬讯科技有限公司 A kind of processing method, server and the storage medium of index application
CN109189812A (en) * 2018-08-14 2019-01-11 中国平安人寿保险股份有限公司 A kind of index querying method, computer readable storage medium and server
CN109213506A (en) * 2018-08-24 2019-01-15 郑州云海信息技术有限公司 A kind of firmware information acquisition methods and relevant apparatus
CN109359124A (en) * 2018-09-21 2019-02-19 郑州大学 A kind of inquiry of construction project water resource demonstration information and identification system
CN111400355A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Data query method and device
CN112347144A (en) * 2021-01-04 2021-02-09 树根互联技术有限公司 Service index query method and device and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159592A (en) * 2007-08-10 2008-04-09 北大方正集团有限公司 Statistical method and device of internet data information clicking rates
CN103577494A (en) * 2012-08-09 2014-02-12 腾讯科技(深圳)有限公司 Light exposure determining method, device and system
CN104317839A (en) * 2014-10-10 2015-01-28 北京国双科技有限公司 Method and device for generating report form template

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159592A (en) * 2007-08-10 2008-04-09 北大方正集团有限公司 Statistical method and device of internet data information clicking rates
CN103577494A (en) * 2012-08-09 2014-02-12 腾讯科技(深圳)有限公司 Light exposure determining method, device and system
CN104317839A (en) * 2014-10-10 2015-01-28 北京国双科技有限公司 Method and device for generating report form template

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763300A (en) * 2018-04-19 2018-11-06 北京奇艺世纪科技有限公司 A kind of data query method and device
CN108763300B (en) * 2018-04-19 2020-07-31 北京奇艺世纪科技有限公司 Data query method and device
WO2019210575A1 (en) * 2018-05-04 2019-11-07 平安科技(深圳)有限公司 Real estate information enquiry method and apparatus, and computer device and storage medium
CN108846015A (en) * 2018-05-04 2018-11-20 平安科技(深圳)有限公司 Real estate information query method, device, computer equipment and storage medium
CN109146397A (en) * 2018-06-29 2019-01-04 深圳市彬讯科技有限公司 A kind of processing method, server and the storage medium of index application
CN109189812A (en) * 2018-08-14 2019-01-11 中国平安人寿保险股份有限公司 A kind of index querying method, computer readable storage medium and server
CN109213506A (en) * 2018-08-24 2019-01-15 郑州云海信息技术有限公司 A kind of firmware information acquisition methods and relevant apparatus
CN109359124A (en) * 2018-09-21 2019-02-19 郑州大学 A kind of inquiry of construction project water resource demonstration information and identification system
CN109359124B (en) * 2018-09-21 2022-02-15 郑州大学 Construction project water resource demonstration information query and type identification system
CN111400355A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Data query method and device
CN111400355B (en) * 2020-03-24 2024-01-30 网易(杭州)网络有限公司 Data query method and device
CN112347144A (en) * 2021-01-04 2021-02-09 树根互联技术有限公司 Service index query method and device and server
CN112347144B (en) * 2021-01-04 2021-05-07 树根互联技术有限公司 Service index query method and device and server

Similar Documents

Publication Publication Date Title
CN107315782A (en) A kind of data query method and device
JP6899065B2 (en) Methods, equipment and non-transient computer readable storage media for the automatic generation of analysis results from blockchain data
CN105074724B (en) Effective query processing is carried out using the histogram in columnar database
CN103748579B (en) Data are handled in MapReduce frame
US10282446B2 (en) Dynamic selection of source table for DB rollup aggregation and query rewrite based on model driven definitions and cardinality estimates
JP6744854B2 (en) Data storage method, data inquiry method, and device thereof
US9858326B2 (en) Distributed data warehouse
US20130166498A1 (en) Model Based OLAP Cube Framework
US20190164176A1 (en) Systems and methods for processing transaction data
CN107220266B (en) Method and device for creating service database, storing service data and determining service data
Kandeil et al. A two-phase clustering analysis for B2B customer segmentation
CN105893526A (en) Multi-source data fusion system and method
CN112364004B (en) Data warehouse-based policy data processing method, device and storage medium
CN104424595A (en) Tax administration monitoring method and tax administration monitoring system thereof
US10579589B2 (en) Data filtering
US10235400B2 (en) Database keying with encoded filter attributes
CN107346315B (en) Object data association index system and construction and application method thereof
CN108009261A (en) A kind of method of data synchronization, device and electronic equipment
CN111414410B (en) Data processing method, device, equipment and storage medium
US20100131338A1 (en) Method and system for managing categories of an electronic commerce website
CN108805659A (en) A kind of intelligent safety management system
US20110184905A1 (en) Method of storing and analysing data produced from interactions between external agents and a system
CN104123303B (en) A kind of method and device that data are provided
CN112101977A (en) Accurate big data analysis method
US8270612B2 (en) Mapping compound keys

Legal Events

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

Application publication date: 20171103

RJ01 Rejection of invention patent application after publication