CN109376171A - Data query method, apparatus, computer storage medium and server - Google Patents
Data query method, apparatus, computer storage medium and server Download PDFInfo
- Publication number
- CN109376171A CN109376171A CN201810931277.4A CN201810931277A CN109376171A CN 109376171 A CN109376171 A CN 109376171A CN 201810931277 A CN201810931277 A CN 201810931277A CN 109376171 A CN109376171 A CN 109376171A
- Authority
- CN
- China
- Prior art keywords
- view
- target
- data
- target query
- subset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to the field of data mining, and in particular to a kind of data query method, apparatus, computer storage medium and server, which comprises obtains the currently used current queries view of user;The target query request for receiving user, calculates the target query based on dynamic selection strategy according to target query request and requests corresponding target view subset;The target view subset is replaced into the failure view subset in the current queries view, generates target query view;The target query is obtained according to the target query view and requests corresponding target query data, shows the target query data.The present invention can in real time, efficiently carry out views selection, obtain target query data.
Description
Technical field
The present invention relates to data processing fields, and in particular to a kind of data query method, apparatus, computer storage medium and
Server.
Background technique
With the development of internet technology, data show explosive growth, and the analysis of data is handled also with data
Growth and difficulty increases, data warehouse technology comes into being, data warehouse be using data support, decision, analysis and develop
The database application technology got up can inquire large batch of data by data warehouse, be polymerize, and be in by view
Reveal inquired data, but with the increasingly increase of data warehouse scale, the data inquired from a large amount of data acquisition disappear
The time of consumption, resource all gradually increase, and the views selection strategy that especially prior art uses is even more to be unable to satisfy user's dynamic
Therefore how the query demand of variation realizes that in real time, rapidly analyzing processing carries out suitable views selection, based on suitable
The problem of inquired data are current big data analysis, treatment industry urgent need to resolve is presented in view.
Summary of the invention
To overcome the above technical problem, the especially prior art that can not in real time, efficiently carry out views selection, acquisition target
The problem of inquiring data, spy propose following technical scheme:
In a first aspect, the present invention provides a kind of data query methods, comprising:
Obtain the currently used current queries view of user;
The target query request for receiving user, according to target query request based on described in the calculating of dynamic selection strategy
Target query requests corresponding target view subset;
The target view subset is replaced into the failure view subset in the current queries view, generates target query view
Figure;
The target query is obtained according to the target query view and requests corresponding target query data, shows the mesh
Mark inquiry data.
It is further, described that the target view subset is replaced into the failure view subset in the current queries view,
Generate target query view, comprising:
The first object view subset in the target view subset is obtained, the first object view subset is replaced into institute
The failure view subset in current queries view is stated, first object is generated and inquires view;
The second target view subset in the target view subset is obtained, the second target view subset is replaced into institute
The failure view subset in current queries view is stated, the second target query view is generated.
Further, described that the corresponding target query number of the target query request is obtained according to the target query view
According to showing the target query data, comprising:
View, which is inquired, according to the first object obtains the corresponding first object inquiry data of the target query request, exhibition
Show the first object inquiry data;And/or
The target query, which is obtained, according to the second target query view requests corresponding second target query data, exhibition
Show the second target query data.
Further, described to be asked according to target query request based on the dynamic selection strategy calculating target query
Seek corresponding target view subset, comprising:
According to target query request based on greedy algorithm calculate the corresponding inquiry field of target query request and
View polymerization methods;Corresponding target view is obtained from data warehouse according to the inquiry field and view polymerization methods
Collection.
Further, described that corresponding target is obtained from data warehouse according to the inquiry field and view polymerization methods
View subset, comprising:
The inquiry field and the view polymerization methods are combined into standard queries sentence according to adaptive stitching algorithm,
Corresponding target view subset is obtained from data warehouse according to the standard queries sentence.
Further, before the currently used current queries view of the acquisition user, further includes:
According to the historical query probability distribution of user, the alternate view of preset quantity is obtained;The alternate view includes mesh
Mark view subset.
Further, after the displaying target query data, further includes:
The data volume for counting the time-consuming of the target query view generated and the target query data of acquisition, according to the time-consuming
And data volume adjusts selection strategy, selection strategy adjusted calculates target view subset for next time.
Second aspect, the present invention also provides a kind of data query devices, comprising:
Obtain module: for obtaining the currently used current queries view of user;
Computing module: the target query for receiving user is requested, according to target query request based on dynamic choosing
It selects target query described in policy calculation and requests corresponding target view subset;
Generation module: for the target view subset to be replaced to the failure view subset in the current queries view,
Generate target query view;
Display module: corresponding target query number is requested for obtaining the target query according to the target query view
According to showing the target query data.
The third aspect, the present invention also provides a kind of computer readable storage medium, the computer readable storage medium
On be stored with computer program, which realizes above-mentioned data query method when being executed by processor.
The third aspect, the present invention also provides a kind of server, the server includes one or more processors, storage
Device, one or more computer programs, wherein one or more of computer programs are stored in the memory and quilt
It is configured to be executed by one or more of processors, one or more of computer programs are configured to carry out above-mentioned number
According to querying method.
Compared with the prior art, the present invention has the following beneficial effects:
The present invention provides a kind of data query method, by obtain the currently used current queries view of user and according to
The target query at family requests calculated target view subset, then target view subset is replaced to the mistake in active view subset
View subset is imitated, target query view is generated, corresponding target is obtained according to target query view Rapid matching database table and is looked into
Data are ask, show the target query data to user, are in advance stored calculated target view subset based on view polymerization
Get up, then replaces the failure view subset in current queries view, it is no longer necessary to calculate again, in real time when inquiring each time
Whole inquiry view out, improves the query performance of data, greatly reduces the load of computer, accelerate the sound of data query
Between seasonable, the experience of user query high-volume data is improved.
In addition, the present invention also provides the polymerizations of the view of the target query view of flexibly configurable to select, pass through different views
Figure polymerization methods obtain different target query views, and then show the target query data of different dimensions, different levels, thus
More fully target query data are provided.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is an embodiment flow diagram of data query method of the present invention;
Fig. 2 is the system flow schematic diagram of data query method of the present invention;
Fig. 3 is an embodiment schematic diagram of data query device of the present invention;
Fig. 4 is an example structure schematic diagram of server of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention
Diction " comprising " refers to that there are the feature, integer, step, operations, but it is not excluded that in the presence of or addition it is one or more other
Feature, integer, step, operation.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here
To explain.
It will be appreciated by those skilled in the art that of the invention so-called " application ", " application program ", " computer program " and
The concept of similar statement, is same concept well known to those skilled in the art, refers to and is instructed by series of computation machine and dependency number
According to the computer software for being suitable for electronics operation of the organic construction of resource.Unless specified, this name itself is not by programming language
Say type, rank, the operating system of operation of also not rely by it or platform are limited.In the nature of things, this genus also not by
Any type of terminal is limited.
In one embodiment, the present invention provides a kind of data query method, is applied to OLAP (On-Line
Analytical Processing, on-line analytical processing) in system, as shown in Figure 1, this method comprises:
S10: the currently used current queries view of user is obtained.
OLAP system extracts a subset and warp of detailed data generally based on data warehouse from data warehouse
It crosses necessary aggregating storing to read into OLAP memory for frontal chromatography tool, the overall process of OLAP system can be regarded as by two
Stage composition, i.e. system start-up phase and on-line operation stage, in system start-up phase, with static views selection strategy from number
According to obtaining corresponding view in warehouse and polymerizeing, view is defined in the Virtual table on SQL Server, and view is that another kind is looked into
It sees the entrance of data, in general, view itself does not store actual data, and only stores Select sentence and involved
And the metadata of table;When system enters the on-line operation stage, just can be taken out from multiple angles by the metadata in data warehouse
It takes, be converted to the view that can be really understood by user.In the present embodiment, existed in user by the query engine of OLAP system
After line inquires data, OLAP system can show the corresponding view of data, obtain the currently used current queries view of user at this time
Figure.
S20: receiving the target query request of user, is calculated according to target query request based on dynamic selection strategy
The target query requests corresponding target view subset.
When user inquires new data from OLAP system again, the target query request of user is received, the target is looked into
Inquiry request is the inquiry field of user configuration, then according to target query request based on described in the calculating of dynamic selection strategy
Target query requests corresponding target view subset, specifically, the inquiry field according to user configuration is obtained from data warehouse
The alternate view of the inquiry field is contained, then default alternate view is selected and is used as the target view subset.By
Multiple queries field is generally comprised in an alternate view, preferably, when choosing default alternate view, default of selection
Alternate view needs to enumerate all inquiry fields, and inquiry field included in the default alternate view chosen
Repetitive rate is low, then requests corresponding target view subset for the alternate view of selection as target query.
S30: replacing the failure view subset in the current queries view for the target view subset, generates target and looks into
Ask view.
After calculating target view subset, if when each inquiry of user, OLAP system is needed according to new inquiry
Ask again, calculate in real time corresponding view be it is very time-consuming, in the present embodiment, first find out the failure in active view
View subset also becomes failure view subset, specifically, user is new to be looked into if certain views in current queries view do not include
Inquiry field in inquiry demand, by those views be positioned as fail view, by all failure views in current queries view at
For the view subset that fails, target view subset obtained above is then replaced into the failure view subset in current queries view,
To generate target query view.
S40: the target query is obtained according to the target query view and requests corresponding target query data, shows institute
State target query data.
Target query can be got according to the target query view and requests corresponding target query data, then existed
Show the target query data in the user interface of OLAP system, user from the user interface of OLAP system can it is intuitive,
Clearly browse to the target query data.It is the data query side that the present embodiment is applied in OLAP system as shown in Figure 2
The system flow schematic diagram of method, user (Client) inquire mesh by the query engine (OLAP Query Proxy) of OLAP system
Data are marked, the data query method of the present embodiment is applied in query engine, obtain the currently used current queries view of user,
Then the target query is calculated based on dynamic selection strategy according to target query request and requests corresponding target view
The target view subset is replaced the failure view subset in the current queries view, generates target query view by subset,
Then the target query is obtained according to the target query view and requests corresponding target query data, show that the target is looked into
Data are ask, 0 target query view shown in Fig. 2 includes D1Vision, D2Vision, D3Vision, is illustrated not to user
With the target query data under view.
The present embodiment provides a kind of data query methods applied in OLAP system, currently used by obtaining user
Current queries view and calculated target view subset is requested according to the target query of user, then replaces target view subset
The failure view subset in active view subset is changed, target query view is generated, according to target query view Rapid matching data
Library table obtains corresponding target query data, shows the target query data to user, will be calculated in advance based on view polymerization
Target view subset out stores, and then replaces the failure view subset in current queries view, it is no longer necessary to each time
Again whole inquiry views is calculated when inquiry, in real time, the query performance of data is improved, greatly reduces computer
Load, accelerates the response time of data query, improves the experience of user query high-volume data.
A kind of embodiment of the invention, the failure target view subset replaced in the current queries view
View subset generates target query view, comprising:
The first object view subset in the target view subset is obtained, the first object view subset is replaced into institute
The failure view subset in current queries view is stated, first object is generated and inquires view;
The second target view subset in the target view subset is obtained, the second target view subset is replaced into institute
The failure view subset in current queries view is stated, the second target query view is generated.
In the present embodiment, the target view subset includes multiple target views, and different view combinations can be combined into
Different target view subsets, such as target view include A, B, C, D, E, F, can be using target view A, B, C, D as first
Target view subset, using target view B, C, D, E, F as the second target view subset, then by the target view subset
The failure view subset in the current queries view is replaced, when generating target query view, obtains the target view subset
In first object view subset, the first object view subset is replaced into of the failure view in the current queries view
Collection generates first object and inquires view, and/or obtains the second target view subset in the target view subset, will be described
Second target view subset replaces the failure view subset in the current queries view, generates the second target query view, with
This generates multiple target query views so that user voluntarily selects.
A kind of embodiment of the invention, it is on the basis of the above embodiments, described to be obtained according to the target query view
The target query requests corresponding target query data, shows the target query data, comprising:
View, which is inquired, according to the first object obtains the corresponding first object inquiry data of the target query request, exhibition
Show the first object inquiry data;And/or
The target query, which is obtained, according to the second target query view requests corresponding second target query data, exhibition
Show the second target query data.
On the basis of above-described embodiment can obtain multiple target query views, in the present embodiment, if the first mesh of selection
Mark inquiry view then inquires the view acquisition target query according to the first object and corresponding first object is requested to inquire number
According to then showing first object inquiry data;If selecting first object to inquire view, according to second target query
View obtains the target query and requests corresponding second target query data, shows the second target query data.Pass through
Multiple target query views can get the target query data of different dimensions, show more comprehensive target query data.
A kind of embodiment of the invention, it is described to be requested according to the target query based on described in the calculating of dynamic selection strategy
Target query requests corresponding target view subset, comprising:
According to target query request based on greedy algorithm calculate the corresponding inquiry field of target query request and
View polymerization methods;Corresponding target view is obtained from data warehouse according to the inquiry field and view polymerization methods
Collection.
In the present embodiment, when requesting to calculate target view subset according to target query, first calculated based on greedy algorithm
Target query requests corresponding inquiry field and view polymerization methods, and greedy algorithm refers to when to problem solving, always makes
Best selection is currently being appeared to be, without taking in from total optimization, the selection made is office in some sense
Portion's optimal solution;Optimal solution can be parsing all inquiry fields of target query request in the present embodiment, then count
The view comprising all inquiry fields is calculated, then, using a view as the target view subset;Alternatively, described
Optimal solution can be the view that each includes the inquiry field, the polymerization methods of those views then be obtained, according to described
Inquiry field obtains corresponding view from data warehouse, those views are aggregated into phase further according to the view polymerization methods of acquisition
The target view subset answered.
A kind of embodiment of the invention, it is on the basis of the above embodiments, described poly- according to the inquiry field and view
Conjunction mode obtains corresponding target view subset from data warehouse, comprising:
The inquiry field and the view polymerization methods are combined into standard queries sentence according to adaptive stitching algorithm,
Corresponding target view subset is obtained from data warehouse according to the standard queries sentence.
Corresponding inquiry field and view polymerization methods are requested calculating target query according to target query request
Afterwards, in the present embodiment, the inquiry field and view polymerization methods are formed by standard queries sentence according to adaptive stitching algorithm,
Then corresponding target view subset, different types of data warehouse are obtained from data warehouse according to the standard queries sentence
Storage mode it is different, for the present embodiment by building standard queries sentence, what is specifically constructed is that the SQL statement of standard can be compatible with
Different types of data warehouse obtains corresponding target view subset from data warehouse;Also, pass through adaptive stitching algorithm
Field will be inquired and view polymerization methods form standard queries sentence, adaptive process is the mistake for constantly approaching target
Journey, standard required for inquiry field and view polymerization methods can be fast and efficiently spliced by adaptive stitching algorithm are looked into
Sentence is ask, and can be by constantly adapting to, approaching more succinct standard queries sentence, so that according to the standard queries language
It is more efficient that sentence obtains corresponding target view subset from data warehouse, to improve the search efficiency of data.
A kind of embodiment of the invention, it is described obtain the currently used current queries view of user before, further includes:
According to the historical query probability distribution of user, the alternate view of preset quantity is obtained;The alternate view includes mesh
Mark view subset.
In the present embodiment, OLAP system can be stored with the alternate view of preset quantity, and the alternate view passes through user's
Historical query probability distribution acquires, also, the alternate view includes target view subset, needs to obtain target subsequent
When view subset, from the alternate view just can after obtain the target view subset, to improve target view subset
Efficiency is obtained, improves the search efficiency of data, such as the field of counting user historical query, then the inquiry according to each field is general
Rate obtains the alternate view comprising those fields, the higher data field of historical query probability, the number of acquired alternate view
It measures also more.Further, after getting the alternate view, data warehouse is added in the alternate view of the preset quantity
In, so that OLAP system rapidly can get target view subset from the alternate view in data warehouse.
A kind of embodiment of the invention, it is described show the target query data after, further includes:
The data volume for counting the time-consuming of the target query view generated and the target query data of acquisition, according to the time-consuming
And data volume adjusts selection strategy, selection strategy adjusted calculates target view subset for next time.
In the present embodiment, after illustrating target query data each time, the time-consuming of the target query view of generation is counted
And the data volume of the target query data obtained, selection strategy is then adjusted according to the time-consuming and data volume, to selection strategy
It is iterated optimization, is then applied to selection strategy adjusted in calculating target view subset next time, so that OLAP
System can fast and efficiently select target view subset.
In another embodiment, as shown in figure 3, the present invention provides a kind of data query device, comprising:
Obtain module 10: for obtaining the currently used current queries view of user;
Computing module 20: the target query for receiving user is requested, according to target query request based on dynamic
Selection strategy calculates the target query and requests corresponding target view subset;
Generation module 30: for the target view subset to be replaced to failure view in the current queries view
Collection generates target query view;
Display module 40: corresponding target query is requested for obtaining the target query according to the target query view
Data show the target query data.
In the present embodiment, the operation data for the new main broadcaster user that module 10 obtains in preset time is obtained, such as described pre-
If the time is 3 months, the operation data of nearly 3 months online new main broadcaster users can be obtained by grabbing back-end data;It obtains
Module 10 is after the operation data for getting new main broadcaster user, in order to predict which new main broadcaster user has preferable development potentiality,
It needs to screen the new main broadcaster user, in the present embodiment, screening module 20 meets day according to operation data screening
The new main broadcaster user for the preset condition actively measured, as candidate main broadcaster user;After screening module 20 filters out candidate main broadcaster user,
The operation data that modeling module 30 chooses the candidate main broadcaster user models, and first has to locate the operation data in advance
Reason, obtains data sample, then using the first preset percentage of data sample as training set, the second of data sample is preset
Percentage constructs decision-tree model and SVM model as test set, with this, adjusts the phase relation of decision-tree model and SVM model
Number, allows the accuracy rate and coverage rate of decision-tree model and SVM model to reach the condition of satisfaction, then by the test set generation of data sample
Enter decision-tree model and SVM model, obtains the model result of the operation data of each new main broadcaster user;Module 40 is excavated by two
The candidate main broadcaster user that a model is all predicted as 1 screens, and is determined as potentiality main broadcaster user.
A kind of embodiment of the invention, the generation module 30 are executed and are currently looked into target view subset replacement is described
The failure view subset in view is ask, target query view is generated, comprising:
The first object view subset in the target view subset is obtained, the first object view subset is replaced into institute
The failure view subset in current queries view is stated, first object is generated and inquires view;
The second target view subset in the target view subset is obtained, the second target view subset is replaced into institute
The failure view subset in current queries view is stated, the second target query view is generated.
A kind of embodiment of the invention, the display module 40, which is executed, obtains the target according to the target query view
The corresponding target query data of inquiry request, show the target query data, comprising:
View, which is inquired, according to the first object obtains the corresponding first object inquiry data of the target query request, exhibition
Show the first object inquiry data;And/or
The target query, which is obtained, according to the second target query view requests corresponding second target query data, exhibition
Show the second target query data.
A kind of embodiment of the invention, the computing module 30 are executed according to target query request based on dynamic choosing
It selects target query described in policy calculation and requests corresponding target view subset, comprising:
According to target query request based on greedy algorithm calculate the corresponding inquiry field of target query request and
View polymerization methods;Corresponding target view is obtained from data warehouse according to the inquiry field and view polymerization methods
Collection.
A kind of embodiment of the invention, the computing module 30 execute according to the inquiry field and view polymerization methods from
Corresponding target view subset is obtained in data warehouse, comprising:
The inquiry field and the view polymerization methods are combined into standard queries sentence according to adaptive stitching algorithm,
Corresponding target view subset is obtained from data warehouse according to the standard queries sentence.
A kind of embodiment of the invention, it is described obtain module execute obtain the currently used current queries view of user it
Before, further include executing:
According to the historical query probability distribution of user, the alternate view of preset quantity is obtained;The alternate view includes mesh
Mark view subset.
A kind of embodiment of the invention, described device further include:
Feedback module: for counting the data of the time-consuming of the target query view generated and the target query data of acquisition
Amount adjusts selection strategy according to the time-consuming and data volume, and selection strategy adjusted calculates target view subset for next time.
In another embodiment, the present invention provides a kind of computer readable storage medium, computer-readable storage mediums
Computer program is stored in matter, which realizes data query method described in above-described embodiment when being executed by processor.Its
In, the computer readable storage medium include but is not limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM,
And magneto-optic disk), ROM (Read-Only Memory, read-only memory), (Random AcceSS Memory, stores RAM immediately
Device), EPROM (EraSable Programmable Read-Only Memory, Erarable Programmable Read only Memory),
(Electrically EraSable Programmable Read-Only Memory, electric erazable programmable is read-only to be deposited EEPROM
Reservoir), flash memory, magnetic card or light card.It is, storage equipment includes by equipment (for example, computer, mobile phone) with energy
Any medium for the form storage or transmission information enough read can be read-only memory, disk or CD etc..
A kind of computer readable storage medium provided in an embodiment of the present invention is, it can be achieved that obtain currently used current of user
Inquire view;The target query request for receiving user calculates institute based on dynamic selection strategy according to target query request
It states target query and requests corresponding target view subset;The target view subset is replaced into the mistake in the current queries view
View subset is imitated, target query view is generated;The target query, which is obtained, according to the target query view requests corresponding mesh
Mark inquiry data, show the target query data.A kind of data query method applied in OLAP system is provided, by obtaining
It takes the currently used current queries view in family and calculated target view subset is requested according to the target query of user, then
Target view subset is replaced into the failure view subset in active view subset, target query view is generated, according to target query
View Rapid matching database table obtains corresponding target query data, the target query data is shown to user, based on view
Figure polymerization in advance stores calculated target view subset, then replaces failure view in current queries view
Collection, it is no longer necessary to whole inquiry views is calculated again, in real time when inquiring each time, improves the query performance of data,
The load for greatly reducing computer is accelerated the response time of data query, and the experience of user query high-volume data is improved.Separately
Outside, the view polymerization choosing of the target query view of flexibly configurable can also be provided in computer readable storage medium provided by the invention
It selects, different target query views is obtained by different view polymerization methods, and then show the mesh of different dimensions, different levels
Mark inquiry data, to provide more fully target query data.
The embodiment of above-mentioned data query method may be implemented in computer readable storage medium provided in an embodiment of the present invention,
Concrete function realizes the explanation referred in embodiment of the method, and details are not described herein.
In addition, the present invention also provides a kind of servers in another embodiment, as shown in figure 4, the server includes
The devices such as processor 403, memory 405, input unit 407 and display unit 409.It will be understood by those skilled in the art that
Structure devices shown in Fig. 4 do not constitute the restriction to Servers-all, may include components more more or fewer than diagram, or
Person combines certain components.Memory 405 can be used for storing computer program 401 and each functional module, and the operation of processor 403 is deposited
The computer program 401 in memory 405 is stored up, thereby executing the various function application and data processing of equipment.Memory 405
It can be built-in storage or external memory, or including both built-in storage and external memory.Built-in storage may include read-only
Memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), quick flashing
Memory or random access memory.External memory may include hard disk, floppy disk, ZIP disk, USB flash disk, tape etc..It is presently disclosed
Memory include but is not limited to these types memory.Memory 405 disclosed in this invention is only used as example rather than makees
To limit.
Input unit 407 is used to receive the input of signal, and receives the keyword of user's input.Input unit 407 can
Including touch panel and other input equipments.Touch panel collects the touch operation of user on it or nearby and (for example uses
Family uses the operations of any suitable object or attachment on touch panel or near touch panel such as finger, stylus), and root
According to the corresponding attachment device of preset driven by program;Other input equipments can include but is not limited to physical keyboard, function
One of key (such as broadcasting control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.Display unit
409 can be used for showing the information of user's input or be supplied to the information of user and the various menus of computer equipment.Display is single
The forms such as liquid crystal display, Organic Light Emitting Diode can be used in member 409.Processor 403 is the control centre of computer equipment, benefit
With the various pieces of various interfaces and the entire computer of connection, by running or executing the software being stored in memory 403
Program and/or module, and the data being stored in memory are called, perform various functions and handle data.Shown in Fig. 4
One or more processors 403 are able to carry out, realize acquisition module 10, computing module 20 shown in Fig. 3, generation module 30,
The function of display module 40.
In one embodiment, the server includes one or more processors 403, and one or more storages
Device 405, one or more computer programs 401, wherein one or more of computer programs 401 are stored in memory
It in 405 and is configured as being executed by one or more of processors 403, one or more of computer programs 401 configure
For executing data query method described in above embodiments.
A kind of server provided in an embodiment of the present invention is, it can be achieved that obtain the currently used current queries view of user;It connects
The target query request for receiving user, calculates the target query based on dynamic selection strategy according to target query request and asks
Seek corresponding target view subset;The target view subset is replaced into the failure view subset in the current queries view,
Generate target query view;The target query, which is obtained, according to the target query view requests corresponding target query data,
Show the target query data.By providing a kind of data query method applied in OLAP system, by obtaining user
Currently used current queries view and calculated target view subset is requested according to the target query of user, then by target
View subset replaces the failure view subset in active view subset, generates target query view, fast according to target query view
Fast matching database table obtains corresponding target query data, shows the target query data to user, is polymerize based on view
Calculated target view subset is stored in advance, then replaces the failure view subset in current queries view, no longer
Again whole inquiry views is calculated when needing to inquire each time, in real time, the query performance of data is improved, greatly subtracts
The load of few computer, accelerates the response time of data query, improves the experience of user query high-volume data.In addition, this hair
The view polymerization selection of the target query view of flexibly configurable can also be provided in the server of bright offer, poly- by different views
Conjunction mode obtains different target query views, and then shows the target query data of different dimensions, different levels, to provide
More fully target query data.
The embodiment of the data query method of above-mentioned offer, specific function may be implemented in server provided in an embodiment of the present invention
It is able to achieve the explanation referred in embodiment of the method, details are not described herein.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of data query method characterized by comprising
Obtain the currently used current queries view of user;
The target query request for receiving user calculates the target based on dynamic selection strategy according to target query request
The corresponding target view subset of inquiry request;
The target view subset is replaced into the failure view subset in the current queries view, generates target query view;
The target query is obtained according to the target query view and requests corresponding target query data, shows that the target is looked into
Ask data.
2. the method according to claim 1, wherein described described currently look into target view subset replacement
The failure view subset in view is ask, target query view is generated, comprising:
The first object view subset in the target view subset is obtained, will be worked as described in first object view subset replacement
Failure view subset in preceding inquiry view generates first object and inquires view;
The second target view subset in the target view subset is obtained, will be worked as described in the second target view subset replacement
Failure view subset in preceding inquiry view generates the second target query view.
3. according to the method described in claim 2, it is characterized in that, described obtain the target according to the target query view
The corresponding target query data of inquiry request, show the target query data, comprising:
View is inquired according to the first object and obtains the corresponding first object inquiry data of the target query request, shows institute
State first object inquiry data;And/or
The target query is obtained according to the second target query view and requests corresponding second target query data, shows institute
State the second target query data.
4. the method according to claim 1, wherein described selected according to target query request based on dynamic
It selects target query described in policy calculation and requests corresponding target view subset, comprising:
The corresponding inquiry field of the target query request and view are calculated based on greedy algorithm according to target query request
Polymerization methods;Corresponding target view subset is obtained from data warehouse according to the inquiry field and view polymerization methods.
5. according to the method described in claim 4, it is characterized in that, it is described according to the inquiry field and view polymerization methods from
Corresponding target view subset is obtained in data warehouse, comprising:
The inquiry field and the view polymerization methods are combined into standard queries sentence according to adaptive stitching algorithm, according to
The standard queries sentence obtains corresponding target view subset from data warehouse.
6. the method according to claim 1, wherein it is described obtain the currently used current queries view of user it
Before, further includes:
According to the historical query probability distribution of user, the alternate view of preset quantity is obtained;The alternate view includes target view
Figure subset.
7. the method according to claim 1, wherein after the displaying target query data, further includes:
The data volume for counting the time-consuming of the target query view generated and the target query data of acquisition, according to described time-consuming and number
Selection strategy is adjusted according to amount, selection strategy adjusted calculates target view subset for next time.
8. a kind of data query device characterized by comprising
Obtain module: for obtaining the currently used current queries view of user;
Computing module: the target query for receiving user is requested, according to target query request based on dynamic selection plan
Approximation calculates the target query and requests corresponding target view subset;
Generation module: it for the target view subset to be replaced to the failure view subset in the current queries view, generates
Target query view;
Display module: requesting corresponding target query data for obtaining the target query according to the target query view,
Show the target query data.
9. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program realizes claim 1 to 7 described in any item data query methods when the computer program is executed by processor.
10. a kind of server characterized by comprising
One or more processors;
Memory;
One or more computer programs, wherein one or more of computer programs are stored in the memory and quilt
It is configured to be executed by one or more of processors, one or more of computer programs are configured to carry out according to right
It is required that 1 to 7 described in any item data query methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810931277.4A CN109376171B (en) | 2018-08-15 | 2018-08-15 | Data query method and device, computer storage medium and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810931277.4A CN109376171B (en) | 2018-08-15 | 2018-08-15 | Data query method and device, computer storage medium and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109376171A true CN109376171A (en) | 2019-02-22 |
CN109376171B CN109376171B (en) | 2020-10-16 |
Family
ID=65404527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810931277.4A Active CN109376171B (en) | 2018-08-15 | 2018-08-15 | Data query method and device, computer storage medium and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109376171B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015787A (en) * | 2020-08-28 | 2020-12-01 | 支付宝(杭州)信息技术有限公司 | Data query method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1763744A (en) * | 2004-08-24 | 2006-04-26 | 微软公司 | Partially materialized views |
CN101477524A (en) * | 2008-12-11 | 2009-07-08 | 金蝶软件(中国)有限公司 | System performance optimization method and system based on materialized view |
CN101556602A (en) * | 2009-04-08 | 2009-10-14 | 王珊 | Memory OLAP What-if analytical method based on a difference table |
US20160306857A1 (en) * | 2015-04-14 | 2016-10-20 | International Business Machines Corporation | Intermediate window results in a streaming environment |
US20170228470A1 (en) * | 2013-02-07 | 2017-08-10 | Enigma Technologies, Inc. | Data system and method |
CN107590275A (en) * | 2017-09-27 | 2018-01-16 | 北京奇虎科技有限公司 | A kind of data query method and apparatus |
-
2018
- 2018-08-15 CN CN201810931277.4A patent/CN109376171B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1763744A (en) * | 2004-08-24 | 2006-04-26 | 微软公司 | Partially materialized views |
CN101477524A (en) * | 2008-12-11 | 2009-07-08 | 金蝶软件(中国)有限公司 | System performance optimization method and system based on materialized view |
CN101556602A (en) * | 2009-04-08 | 2009-10-14 | 王珊 | Memory OLAP What-if analytical method based on a difference table |
US20170228470A1 (en) * | 2013-02-07 | 2017-08-10 | Enigma Technologies, Inc. | Data system and method |
US20160306857A1 (en) * | 2015-04-14 | 2016-10-20 | International Business Machines Corporation | Intermediate window results in a streaming environment |
CN107590275A (en) * | 2017-09-27 | 2018-01-16 | 北京奇虎科技有限公司 | A kind of data query method and apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015787A (en) * | 2020-08-28 | 2020-12-01 | 支付宝(杭州)信息技术有限公司 | Data query method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109376171B (en) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11010395B2 (en) | Analytics mediation for microservice architectures | |
US8219581B2 (en) | Method and system for analyzing ordered data using pattern matching in a relational database | |
US9773032B2 (en) | Provision of index recommendations for database access | |
US10810600B2 (en) | Using multi-factor context for resolving customer service issues | |
US20060004528A1 (en) | Apparatus and method for extracting similar source code | |
CN108090032B (en) | Visual interpretation method and device of logistic regression model | |
US9930113B2 (en) | Data retrieval via a telecommunication network | |
CN110309110A (en) | A kind of big data log monitoring method and device, storage medium and computer equipment | |
CN109299215A (en) | Resource allocation methods, device and storage medium, the server of inverted index inquiry | |
CN111444438B (en) | Method, device, equipment and storage medium for determining quasi-recall rate of recall strategy | |
CN112395333B (en) | Method, device, electronic equipment and storage medium for checking data abnormality | |
CN111506803A (en) | Content recommendation method and device, electronic equipment and storage medium | |
US20070233532A1 (en) | Business process analysis apparatus | |
US8666914B1 (en) | Ranking non-product documents | |
CN111382256B (en) | Information recommendation method and device | |
CN110427773A (en) | Information processing method, device, storage medium and terminal device | |
Sturm et al. | Leave No Stone Unturned: Introducing a Revolutionary Meta-search Tool for Rigorous and Efficient Systematic Literature Searches. | |
CN115335821A (en) | Offloading statistics collection | |
CN112000330A (en) | Configuration method, device and equipment of modeling parameters and computer storage medium | |
CN109376171A (en) | Data query method, apparatus, computer storage medium and server | |
KR20210038473A (en) | Document type recommendation method and apparatus, electronic device and readable storage medium | |
CN112181410A (en) | View layer code generation method and device, electronic equipment and storage medium | |
CN109377385A (en) | Front end obtaining value method, device, computer readable storage medium and terminal | |
US10019477B2 (en) | Anticipatory query completion by pattern detection | |
CN113778973A (en) | Data storage method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |