Summary of the invention
In view of this, the embodiment of the present invention provides a kind of multidimensional data query method and device, too small amount of rope can be led to
Draw the quick-searching for realizing data, and the quantity indexed does not increase with the increase of number of dimensions, additionally it is possible to unite to dimension data
One is managed, and reduces dimension management complexity.
To achieve the above object, according to a first aspect of the embodiments of the present invention, a kind of multidimensional data query method is provided.
A kind of multidimensional data query method of the embodiment of the present invention, comprising: according to true table and related to the true table
Dimension table, establish dimension retrieval table, and increase the composite index of the dimension retrieval table;According at least one in inquiry request
Dimension querying condition is inquired in the dimension retrieval table using the composite index, determines target data major key;According to described
Target data major key inquires the true table, obtains the data for needing to inquire in the inquiry request.
Optionally, described according to true table and dimension table relevant to the fact table, establish dimension retrieval table, comprising:
Determine fact table and dimension table relevant to the fact table;It, will be described for one group of fact table data in the true table
The data master of dimension name, the corresponding dimension values of dimension name and one group of fact table data in one group of fact table data
Key is stored into dimension retrieval table;It, will be in one group of dimension table data for one group of dimension table data in the dimension table
Dimension name, the data master in the corresponding dimension values of dimension name and true table corresponding to one group of dimension table data
Key is stored into the dimension retrieval table.
Optionally, at least one dimension querying condition in the request based on the query, using the composite index described
It is inquired in dimension retrieval table, determines target data major key, comprising: received inquiry request, include at least one in the inquiry request
A dimension querying condition;According at least one described dimension querying condition, the corresponding inquiry data master of the inquiry request is generated
Keyset closes;According to the condition number of at least one dimension querying condition, mesh is selected from the inquiry data major key set
Mark data major key.
Optionally, described at least one dimension querying condition according to, generates the corresponding inquiry number of the inquiry request
According to major key set, comprising: for a dimension querying condition at least one described dimension querying condition, examined in the dimension
It is inquired in rope table, determines that the corresponding data major key of dimension values for meeting one dimension querying condition is inquiry data master
Key;According to the inquiry data major key, the corresponding inquiry data major key set of the inquiry request is generated.
Optionally, the condition number of at least one dimension querying condition according to, from the inquiry data major key
Selection target data major key in set, comprising: determine the condition number of at least one dimension querying condition;To the inquiry
Inquiry data major key in data major key set is grouped, and at least one set of inquiry data major key is obtained, wherein every group polling number
It is identical according to the inquiry data major key in major key;For the group polling data master at least one set of inquiry data major key
Key, if the number for inquiring data major key in the group polling data major key is identical as the condition number, it is determined that described one
Inquiry data major key in group polling data major key is target data major key.
Optionally, the composite index for increasing the dimension retrieval table, comprising: according to the dimension stored in dimension retrieval table
Name field, dimension value field and data major key field are spent, the composite index of the dimension retrieval table is established.
To achieve the above object, according to a second aspect of the embodiments of the present invention, a kind of multidimensional inquiring device is provided.
A kind of multidimensional inquiring device of the embodiment of the present invention, comprising: establish module, for according to true table and with institute
The relevant dimension table of true table is stated, dimension retrieval table is established, and increases the composite index of the dimension retrieval table;Determining module,
For being looked into the dimension retrieval table using the composite index according at least one dimension querying condition in inquiry request
It askes, determines target data major key;Enquiry module, for inquiring the true table, obtaining described according to the target data major key
The data for needing to inquire in inquiry request.
Optionally, the module of establishing is also used to: determining fact table and dimension table relevant to the fact table;For institute
One group of fact table data in true table are stated, by dimension name, the corresponding dimension of dimension name in one group of fact table data
The data major key of angle value and one group of fact table data, stores into dimension retrieval table;For one in the dimension table
Group dimension table data, by dimension name, the corresponding dimension values of dimension name and described one in one group of dimension table data
Data major key in true table corresponding to group dimension table data, stores into the dimension retrieval table.
Optionally, the determining module is also used to: being received inquiry request, is included at least one dimension in the inquiry request
Querying condition;According at least one described dimension querying condition, the corresponding inquiry data major key set of the inquiry request is generated;
According to the condition number of at least one dimension querying condition, the selection target data master from the inquiry data major key set
Key.
Optionally, the determining module is also used to: being looked into for a dimension at least one described dimension querying condition
Inquiry condition is inquired in the dimension retrieval table, determines that the dimension values for meeting one dimension querying condition are corresponding
Data major key is inquiry data major key;According to the inquiry data major key, the corresponding inquiry data master of the inquiry request is generated
Keyset closes.
Optionally, the determining module is also used to: determining the condition number of at least one dimension querying condition;To institute
The inquiry data major key stated in inquiry data major key set is grouped, and at least one set of inquiry data major key is obtained, wherein every group
The inquiry data major key inquired in data major key is identical;For the group polling at least one set of inquiry data major key
Data major key, if the number for inquiring data major key in the group polling data major key is identical as the condition number, it is determined that
Inquiry data major key in the one group polling data major key is target data major key.
Optionally, the module of establishing is also used to: according to stored in dimension retrieval table dimension name field, dimension values word
Section and data major key field, establish the composite index of the dimension retrieval table.
To achieve the above object, according to a third aspect of the embodiments of the present invention, a kind of electronic equipment is provided.
The a kind of electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one
Or multiple programs, when one or more programs are executed by one or more processors, so that one or more processors realize this
The multidimensional data query method of inventive embodiments.
To achieve the above object, according to a fourth aspect of the embodiments of the present invention, a kind of computer-readable medium is provided.
A kind of computer-readable medium of the embodiment of the present invention, is stored thereon with computer program, and program is held by processor
The multidimensional data query method of the embodiment of the present invention is realized when row.
One embodiment in foregoing invention have the following advantages that or the utility model has the advantages that because use dimension retrieval table, and
Dimension retrieves the technological means for increasing composite index in table, and overcome dimension causes to index more problems more, only creates on a small quantity
Index can realize the quick-searching of data, and the quantity indexed does not increase with the increase of number of dimensions, can also utilize
Dimension retrieval table is uniformly managed dimension data, reduces dimension management complexity.It is established in dimension retrieval table in the present invention
Data major key field, can in multidimensional inquiring, to the corresponding data major key of the dimension values for meeting dimension querying condition into
Row statistics, so as to get the corresponding number of the data for needing to inquire in inquiry request by the data major key number of statistics
According to major key, achieve the effect that data needed for obtaining.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the key step of multidimensional data query method according to an embodiment of the present invention.As the present invention
One can refer to embodiment, as shown in Figure 1, the key step of the multidimensional data query method of the embodiment of the present invention can wrap
It includes:
Step S101: according to true table and dimension table relevant to true table, establishing dimension retrieval table, and increases dimension inspection
The composite index of rope table;
Step S102: according at least one dimension querying condition in inquiry request, table is retrieved in dimension using composite index
Middle inquiry determines target data major key;
Step S103: according to target data major key, true table is inquired, the data for needing to inquire in inquiry request are obtained.
The core ideas of multidimensional inquiring of the invention are as follows: step S101 establishes the corresponding dimension of true table and retrieves table,
Then step S102 is inquired to obtain target data major key in dimension retrieval table, and final step S103 is by obtained target
Data major key inquires true table, gets the data for needing to inquire.Wherein, the true table in the present invention is needed according to inquiry request
It is determined, if what is inquired in inquiry request is achievement, list of results is true table, if what is inquired in inquiry request is personal letter
Breath, then personal information table is true table, and the corresponding dimension retrieval table of true table refers to true table and relevant to true table
Dimension table is handled, and dimension retrieval table is obtained.
It should be noted that dimension table is a dimension of true table, and there is dimension (that is, the word of Attribute class in true table
Section) and true (that is, the field for the class that states the fact, usually numeric data) these two types of fields, such as, in list of results, student
(individual), subject, term etc. are dimensions, and achievement is true.Therefore, can according to whether have in dimension table true field come
Judge whether the dimension table is true table.In the present invention, if a field can be carried out polymerization calculating (summation, mean value,
Maximum value, minimum value etc.), then can determine that the field is true field.Such as this field of has age in personal information table,
If there is demand will summarize max age, average age, then the age is both that dimension is also the fact that, correspondingly, personal information table
It is both dimension table, is also possible to true table.It should also be noted that the age, this field can also extend in personal information table
The extended attribute of age bracket out, for example, can for the age define a dimension table, such as define 2 to 3 years old be child, be within 4 to 8 years old
Child 9 to 18 years old is teenager etc., thus can extend year again by the age attribute (dimension) of the personal factor of list of results
The dimension of age group.In conclusion personal information table can be a true table, it is also possible to a dimension of list of results, quite
Then an individual dimension table.For individual dimension table in the present invention, it is associated with true table, and by dimension table
In dimension and true table establish connection, be unifiedly stored in dimension retrieval table, such as personal information table and list of results can be with
It is associated by name.
The foundation that dimension retrieves table is used as an important technology point of the invention, in above-mentioned steps S101 using true table with
Dimension table establishes dimension retrieval table.All dimensional informations of true table are stored in dimension retrieval table.In addition, in true table
There are also some dimension tables relevant to true table, the information of these dimension tables to be also required to be stored in dimension retrieval table for surrounding.Example
As said, the attribute dimensions such as gender, age in the personal information table (dimension table) of list of results (true table) are also saved in dimension inspection
In rope table, the data major key of preservation is corresponding data major key in list of results.
Include dimension name, dimension values and data major key in dimension retrieval table of the invention, data major key be true table or
The unique identification of one group of data in person's dimension table, such as line number, sequence number etc..Fig. 2 be it is according to the present invention another can
Reference implementation example establishes the main flow schematic diagram of dimension retrieval table.As shown in Fig. 2, establishing dimension retrieval table, that is, obtain
The detailed process of information in dimension retrieval table may include step S201, step S202 and step S203.
Step S201: fact table and dimension table relevant to true table are determined, using Sophomore list of results as thing
For real table, dimension table relevant to the fact table is Sophomore information table and Sophomore post information
Table, wherein table 1 is Sophomore list of results, and table 2 is Sophomore information table, and table 3 is grade of senior middle school
Raw post information table, the student of this 3 tables is identical, and 2 student information table of table can be used as the dimension of the personal information in table 1
Degree, 3 student's post information table of table can also be used as the post information dimension in table 1, thus this 3 tables be it is relevant, for table 1
For, table 2 and table 3 can be regarded as its independent dimension table.
1 Sophomore list of results of table
Table 2 is Sophomore information table
Table 3 is Sophomore post information table
Step S202: dimension name, dimension values and the data major key information in true table are stored into dimension retrieval table,
Dimension name refers to that the title of storage dimension field, dimension values refer to the numerical value for storing specific dimension, the data master stored herein
Key refers to the unique identification of every group of data in true table.The specific method that information in true table is stored to dimension retrieval table is
For one group of fact table data in true table, by dimension name, the corresponding dimension of dimension name in one group of fact table data
The data major key of value and one group of fact table data, stores into dimension retrieval table.Such as 1 senior middle school of table, one grade student performance thing
Shown in real table, the unique identification of each row of data in table 1, as data major key information, in table 1,1,2,3 believe for data major key
Breath.It can also be seen that Chinese Achievement Test grade, mathematics achievement grade, English Score grade, the comprehensive rating achievement rating of text and reason are comprehensive from table 1
Rating achievement rating is dimension name.By the dimension name of data line every in table 1, the corresponding dimension values of the dimension name and this
The corresponding data major key of row data is stored in dimension retrieval table, obtains dimension retrieval table shown in table 4.
Table 4 is that the corresponding dimension of table 1 retrieves table
Step S203: the information of dimension table relevant to true table is stored into dimension retrieval table, implementation method is needle
To one group of dimension table data in dimension table, by dimension name, the corresponding dimension values of dimension name in one group of dimension table data
And the data major key in true table corresponding to one group of dimension table data, it stores into dimension retrieval table.From table 1, table 2 and table 3
As can be seen that the student in these three tables be it is identical, illustrated with the information data of the first classmate in table 2, first classmate's Information Number
According to the performance information table of the first classmate in corresponding table 1, if therefore be the foundation that true table carries out that dimension retrieves table with table 1, in table 2
First classmate the corresponding data major key information of information data be 1.Therefore, 2 Sophomore information table of table and table 3 is high
The dimension name of every data line, the corresponding dimension values of the dimension name and this row in middle first-year student post information table
The corresponding data major key of data is stored in dimension retrieval table, obtains dimension retrieval table shown in table 5.
Table 5 is that table 2 and the corresponding dimension of table 3 retrieve table
It should be noted that for ease of description, by above-mentioned example dimension retrieval table 4 and dimension retrieval table 5 split
It is explained at two tables, and the dimension that dimension retrieval table is obtained according to true table in the present invention and is obtained according to dimension table
Degree retrieval table should merge into a dimension retrieval table.In addition, being mentioned in the above-mentioned description for true table and dimension table, this hair
Dimension table in bright is a dimension of true table, but dimension table itself may be also a true table.With 1 senior middle school of table 1 year
For grade Students' Score List, 3 Sophomore duty list of 2 Sophomore information table of table and table, in multidimensional data
When analysis, can class's ranking field to table 1 carry out polymerization calculating, such as maximizing, therefore table 1 can be true table;
Polymerization calculating can also be carried out to the age field in table 2, for example is averaging the age, and therefore, table 2 is also possible to true table.For
The corresponding dimension retrieval table of different true tables is distinguished, can be retrieved in dimension and be increased by one in table and represent fact table name
Field, as shown in table 6 and table 7.
Table 6 is table 1 when being true table, and corresponding dimension retrieves table, that is to say, that table 6 is with 1 Sophomore of table
List of results is that true table is built using 2 Sophomore information table of table and 3 Sophomore duty list of table as dimension table
Vertical dimension retrieves table.Table 7 is table 2 when being true table, and corresponding dimension retrieves table, i.e. table 7 is with 2 Sophomore of table
Information table is that true table is built using 1 Sophomore list of results of table and 3 Sophomore duty list of table as dimension table
Vertical dimension retrieves table.It should be noted that the corresponding data major key of first is 1001 in 2 Sophomore information table of table,
The corresponding data major key of second is 1002, and the third corresponding data major key is 1003.It is that table 6 and table 7 are split into description, this hair herein
It is bright that table 6 and table 7 can be merged into a dimension retrieval table, only add the title of true table in table by retrieving in dimension in this way
Field, so that it may the dimension retrieval table of all true tables is merged into a dimension retrieval table, so as to realize the system of dimension
One management.
Table 6 is table 1 when being true table, and corresponding dimension retrieves table
Table 7 is table 2 when being true table, and corresponding dimension retrieves table
After establishing dimension retrieval table, also increase the composite index of dimension retrieval table in step s101.Index is suitable
Dimension name field, dimension are stored in dimension retrieval table in the index that catalogue, review index are made of multiple fields, the present invention
Angle value field and data major key field, can establish composite index according to these three fields, and the quantity indexed will not be with
The increase of number of dimensions and increase, in addition, in the present invention addition of composite index can be improved the inquiry to dimension retrieval table effect
Rate.For example, the sequence of dimension retrieval table is dimension name, dimension values and data key in table 4 and table 5, therefore the present invention can
To establish dimension according to dimension name field, the sequence of dimension value field and data major key field stored in dimension retrieval table
Retrieve the composite index of table.
Dimension retrieves table as an important technology point of the invention, it spreads for the operation of subsequent multidimensional inquiring
Pad, then how to be another important technology point of the invention using dimension retrieval table inquiry data.In step s 102, it obtains
To after inquiry request, so that it may according to the dimension querying condition in inquiry request, using composite index in dimension retrieval table into
Row inquiry, obtains the corresponding target data major key of the inquiry request.Fig. 3 be it is according to the present invention another to can refer to embodiment true
The main flow schematic diagram of the data that set the goal major key.As shown in figure 3, the present invention sets the goal really, the main flow of data major key can
To include step S301, step S302 and step S303.
Step S301: receiving inquiry request, includes which at least one dimension querying condition and needs inquire in inquiry request
A little data, such as the class rank of query English rating achievement rating is B, affiliated class is one class student, then in the inquiry request
Have that English Score grade is B and affiliated class is one class of the two dimension querying condition, the data for needing to inquire are class ranks.
Herein it should be noted that usually carrying out polymerization calculating to data by dimension when multidimensional data query is analyzed, if not
Data carry out polymerization calculating, only simply inquire data detail, have little significance, it is contemplated that only simple in above table to lift first
The information of the third three classmates of second is illustrated, and many information is not enumerated, in order to make it easy to understand, inquiry request provided herein
It is class rank to be inquired, but in practical applications, it is to the thing in true table that multidimensional inquiring, which needs the data inquired,
Full word section carries out the data that polymerization is calculated, such as ask maximum value or the minimum value of ranking etc..
Step S302: according at least one dimension querying condition, the corresponding inquiry data major key set of inquiry request is generated.
In the embodiment of the present invention, generating the corresponding inquiry data major key set of inquiry request may include: to look at least one dimension
A dimension querying condition in inquiry condition, is inquired in dimension retrieval table, is determined and is met a dimension querying condition
The corresponding data major key of dimension values is inquiry data major key;According to inquiry data major key, the corresponding inquiry number of inquiry request is generated
According to major key set.For example, two dimension querying conditions are that English Score grade is B and affiliated class is one class, for
One dimension querying condition English Score grade is that B is analyzed, and inquires in dimension retrieval table, obtains 1 sum number of data major key
It is B according to the corresponding English Score grade of major key 2, is one class for second affiliated class of dimension querying condition and is analyzed,
It is inquired in dimension retrieval table, obtaining data major key 2 and the corresponding affiliated class of data major key 3 is one class, therefore obtains inquiry number
According to major key set are as follows: 1,2,2 and 3.
Step S303: it according to the condition number of at least one dimension querying condition, is selected from inquiry data major key set
Target data major key.The main flow of selection target data major key may include: from inquiry data major key set in the present invention
Determine the condition number of at least one dimension querying condition;Inquiry data major key in inquiry data major key set is divided
Group obtains at least one set of inquiry data major key, wherein the inquiry data major key in every group polling data major key is identical;For
A group polling data major key at least one set inquiry data major key, if inquiring of data major key in a group polling data major key
Number is identical as condition number, it is determined that the inquiry data major key in a group polling data major key is target data major key.The present invention
After step S102 gets target data major key, the target data major key then obtained according to inquiry is looked into true table
Data required for asking.
Specific example explanation, the class rank for the student that query English rating achievement rating is B, affiliated class is one class then should
The number of dimension querying condition in inquiry request is 2, the inquiry data major key set then obtained in step s 302 are as follows: 1,
2,2 and 3.Then, the inquiry data major key in inquiry data major key set is grouped, identical inquiry data major key is put
Together, 3 groups are obtained therefore, the 1st group polling data major key is the inquiry number that the 1, the 2nd group polling data major key is the 2 and 2, the 3rd group
It is 3 according to major key.Then, the number for counting the 2nd group of inquiry data major key is 2, identical as condition number 2, it is thus determined that data
Major key 2 is target data major key.Finally, inquiry data major key was 3 corresponding years in 1 Sophomore list of results of table
Grade ranking is 62.
Multidimensional data query method is illustrated below in conjunction with specific computer statement.
Case 1, the dimension on 1 Sophomore list of results of table carry out various dimensions query composition.Inquiry request: it looks into
Inquiry Chinese Achievement Test grade is A, English Score grade is B, style rating achievement rating is the corresponding class's ranking of B.Using of the invention
Multidimensional data query method obtains:
The first step is inquired in dimension retrieval table by dimension condition, and result is saved in interim table.
Second step is grouped above-mentioned " interim table _ dimension query result " by data major key, summarizes each data major key
The stroke count of data is inquired, data stroke count data major key identical with conditional number is selected, is saved in new interim table.Due to dimension
The number for spending querying condition is 3, therefore takes COUNT (*)=3.
Third step, using the data major key inventory in above-mentioned " interim table _ data major key result ", in 1 senior middle school of table one grade
Class's ranking is inquired in Students' Score List.
Case 2, the dimension on 2 Sophomore information table of 1 Sophomore list of results of table and table carry out
Various dimensions query composition.Inquiry request: inquiry Chinese Achievement Test grade be A, English Score grade is B, style rating achievement rating be B,
Nationality is the corresponding class's ranking of Han nationality.The querying method of case 2 is similar in case 1, need to only modify the inquiry of condition part, and
Condition number.The inquiry that three steps merge together is as follows:
Fig. 4 is that another main flow that can refer to the multidimensional data query method of embodiment according to the present invention is illustrated
Figure.As shown in figure 4, multidimensional data query method of the invention mainly may include:
Step S401: fact table and dimension table relevant to true table are determined;
Step S402: the information in true table is stored into dimension retrieval table, and concrete methods of realizing is for true table
In one group of fact table data, by the dimension name in one group of fact table data, the corresponding dimension values of dimension name and one group
The data major key of true table data, it is also necessary to store the title of true table into dimension retrieval table;
Step S403: the information of dimension table relevant to true table is stored into dimension retrieval table, in dimension table
One group of dimension table data, by dimension name, the corresponding dimension values of dimension name and the one group of dimension in one group of dimension table data
Spend the data major key in true table corresponding to table data, store into dimension retrieval table, and by the title of dimension table store to
Dimension is retrieved in table;
Step S404: according to the dimension name field, dimension value field and data major key field stored in dimension retrieval table,
Establish the composite index of dimension retrieval table;
Step S405: inquiry request is received, and determines the condition number of dimension querying condition in inquiry request, is furthermore inquired
It further include that data needed to inquire in request;
Step S406: determining that each dimension inquires corresponding inquiry data major key, these inquiry data major keys constitute this and look into
It askes and requests corresponding inquiry data major key set, wherein determining that each dimension inquires the detailed process of corresponding inquiry data major key
The specific explanations in above step S302, are not repeated herein;
Step S407: the inquiry data major key in inquiry data major key set is grouped, at least one set of inquiry is obtained
Data major key, wherein the inquiry data major key in every group polling data major key is identical;
Step S408: from least one set inquiry data major key in select a group polling data major key, wherein selection this
The number that data major key is inquired in group polling data major key is identical as condition number;
Step S409: determining that the data major key in this group polling data major key selected is target data major key, utilizes
Composite index inquires the corresponding data of target data major key in true table, obtains the data for needing to inquire in inquiry request.
The technical solution of multidimensional inquiring according to the present invention because retrieving table using dimension, and retrieves table in dimension
The middle technological means for increasing composite index, overcome dimension causes to index more problems more, only creates a small amount of index
It realizes the quick-searching of data, and the quantity indexed does not increase with the increase of number of dimensions, table can also be retrieved using dimension
Dimension data is uniformly managed, dimension management complexity is reduced.Data major key word is established in the present invention in dimension retrieval table
Section, can count the corresponding data major key of the dimension values for meeting dimension querying condition in multidimensional inquiring, thus
The corresponding data major key of the data for needing to inquire in inquiry request can be got, is reached by the data major key number of statistics
The effect of data needed for obtaining.
Fig. 5 is the schematic diagram of the main modular of multidimensional inquiring device according to an embodiment of the present invention.As shown in figure 5,
The multidimensional inquiring device 500 of the embodiment of the present invention mainly comprises the following modules: establishing module 501, determining module 502 and looks into
Ask module 503.Wherein,
Establishing module 501 can be used for: according to true table and dimension table relevant to true table, dimension retrieval table is established, and
Increase the composite index of dimension retrieval table;
Determining module 502 can be used for: according at least one dimension querying condition in inquiry request, tieed up using composite index
It is inquired in degree retrieval table, determines target data major key;
Enquiry module 503 can be used for: according to target data major key, inquiring true table, obtains needing to inquire in inquiry request
Data.
In the embodiment of the present invention, establishing module 501 can also be used in:
Determine fact table and dimension table relevant to true table;
For one group of fact table data in true table, by dimension name, the dimension name pair in one group of fact table data
The data major key of the dimension values answered and one group of fact table data is stored into dimension retrieval table;
For one group of dimension table data in dimension table, by dimension name, the dimension name pair in one group of dimension table data
Data major key in the dimension values answered and true table corresponding to one group of dimension table data, stores into dimension retrieval table.
In the embodiment of the present invention, determining module 502 can also be used in:
Inquiry request is received, includes at least one dimension querying condition in inquiry request;
According at least one dimension querying condition, the corresponding inquiry data major key set of inquiry request is generated;
According to the condition number of at least one dimension querying condition, the selection target data master from inquiry data major key set
Key.
In the embodiment of the present invention, determining module 502 can also be used in:
For a dimension querying condition at least one dimension querying condition, inquired in dimension retrieval table,
Determine that the corresponding data major key of dimension values for meeting a dimension querying condition is inquiry data major key;
According to inquiry data major key, the corresponding inquiry data major key set of inquiry request is generated.
In the embodiment of the present invention, determining module 502 can also be used in:
Determine the condition number of at least one dimension querying condition;
Inquiry data major key in inquiry data major key set is grouped, at least one set of inquiry data major key is obtained,
Wherein the inquiry data major key in every group polling data major key is identical;
For the group polling data major key at least one set of inquiry data major key, if being inquired in a group polling data major key
The number of data major key is identical as condition number, it is determined that the inquiry data major key in a group polling data major key is target data
Major key.
In the embodiment of the present invention, establishing module 501 can also be used in: according to the dimension name word stored in dimension retrieval table
Section, dimension value field and data major key field, establish the composite index of dimension retrieval table.
From the above, it can be seen that multidimensional inquiring device of the invention can retrieve table using dimension, and tieing up
Increase the technological means of composite index in degree retrieval table, overcome dimension causes to index more problems more, only creates a small amount of rope
Draw the quick-searching that can realize data, and the quantity indexed does not increase with the increase of number of dimensions, dimension can also be utilized
Degree retrieval table is uniformly managed dimension data, reduces dimension management complexity.Number is established in dimension retrieval table in the present invention
According to major key field, the corresponding data major key of the dimension values for meeting dimension querying condition can be carried out in multidimensional inquiring
Statistics, so as to get the corresponding data of the data for needing to inquire in inquiry request by the data major key number of statistics
Major key achievees the effect that data needed for obtaining.
Fig. 6, which is shown, can apply the multidimensional data query method of the embodiment of the present invention or showing for multidimensional inquiring device
Example property system architecture 600.
As shown in fig. 6, system architecture 600 may include terminal device 601,602,603, network 604 and server 605.
Network 604 between terminal device 601,602,603 and server 605 to provide the medium of communication link.Network 604 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 601,602,603 and be interacted by network 604 with server 605, to receive or send out
Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 601,602,603
(merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 601,602,603 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 605 can be to provide the server of various services, such as utilize terminal device 601,602,603 to user
The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception
To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter
Breath -- merely illustrative) feed back to terminal device.
It should be noted that multidimensional data query method provided by the embodiment of the present invention is generally executed by server 605,
Correspondingly, multidimensional inquiring device is generally positioned in server 605.
It should be understood that the number of terminal device, network and server in Fig. 6 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 7, it illustrates the computer systems 700 for the terminal device for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.Terminal device shown in Fig. 7 is only an example, function to the embodiment of the present invention and should not use model
Shroud carrys out any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in
Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and
Execute various movements appropriate and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data.
CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always
Line 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention
Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer
Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.?
In such embodiment, which can be downloaded and installed from network by communications portion 709, and/or from can
Medium 711 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 701, system of the invention is executed
The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet
It includes and establishes module, determining module and enquiry module.Wherein, the title of these modules is not constituted under certain conditions to the module
The restriction of itself is also described as " according to true table and dimension table relevant to true table, establishing for example, establishing module
Dimension retrieves table, and increases the module of the composite index of dimension retrieval table ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes: to establish dimension retrieval table according to true table and dimension table relevant to true table, and increase dimension retrieval table
Composite index;According at least one dimension querying condition in inquiry request, inquired in dimension retrieval table using composite index,
Determine target data major key;According to target data major key, true table is inquired, the data for needing to inquire in inquiry request are obtained.
Technical solution according to an embodiment of the present invention can be retrieved table using dimension, and be increased again in dimension retrieval table
The technological means for closing index, overcome dimension causes to index more problems more, and data can be realized by only creating a small amount of index
Quick-searching, and index quantity do not increase with the increase of number of dimensions, can also using dimension retrieval table to number of dimensions
According to being uniformly managed, dimension management complexity is reduced.Data major key field, Ke Yi are established in dimension retrieval table in the present invention
When multidimensional inquiring, the corresponding data major key of the dimension values for meeting dimension querying condition is counted, so as to by
The data major key number of statistics gets the corresponding data major key of the data for needing to inquire in inquiry request, reaches needed for acquisition
The effect of data.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.