CN108268523A - Database aggregation processing method and device - Google Patents

Database aggregation processing method and device Download PDF

Info

Publication number
CN108268523A
CN108268523A CN201611264048.9A CN201611264048A CN108268523A CN 108268523 A CN108268523 A CN 108268523A CN 201611264048 A CN201611264048 A CN 201611264048A CN 108268523 A CN108268523 A CN 108268523A
Authority
CN
China
Prior art keywords
index
dimension
equivalent
target polymerization
aggregation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611264048.9A
Other languages
Chinese (zh)
Other versions
CN108268523B (en
Inventor
洪超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201611264048.9A priority Critical patent/CN108268523B/en
Publication of CN108268523A publication Critical patent/CN108268523A/en
Application granted granted Critical
Publication of CN108268523B publication Critical patent/CN108268523B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/244Grouping and aggregation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24537Query rewriting; Transformation of operators

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application discloses a kind of database aggregation processing method and devices.This method includes:The dimension and index in the querying condition for inquiring database are obtained, wherein, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;Search the corresponding equivalent index of each index in querying condition;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;If not including dimension in the Aggregation Table where equivalent index, judge whether include dimension in target polymerization table;If it is judged that being yes, inquired in target polymerization table using equivalent index and dimension, and return to the result obtained after inquiry.By the application, it is relatively low to solve the problems, such as to carry out search efficiency during data query in the database in the relevant technologies.

Description

Database aggregation processing method and device
Technical field
This application involves field of database query technology, in particular to a kind of database aggregation processing method and dress It puts.
Background technology
In existing product, many data can be recorded in the original tables of data of front end, therefore lead to original data Table is too big.When carrying out data query in original tables of data, it can lead to that performance cost is larger, query process is slow, inquiry It is less efficient.To accelerate the data query of front end, it will usually be accelerated by prepolymerization table.However work as and use these pre-polymerizations It is to need all internal indicators on prepolymerization table being presented to front end, front end caller needs basis when closing the index on table Index in the raw data base selective goal from all internal indicators on prepolymerization table, if prepolymerization table includes inquiry Dimension in condition carries out dimension anatomy according to the index selected in all internal indicators on prepolymerization table in prepolymerization table, If there is no to include the dimension in querying condition in prepolymerization table, then it is assumed that can not be dissected in prepolymerization table.
Even if however, there is no to include the dimension in querying condition in prepolymerization table in some cases and can be in pre-polymerization It is dissected in conjunction table, therefore whether is sentenced in the relevant technologies only according in prepolymerization table including the dimension in querying condition Whether can in prepolymerization table carry out dissect be inaccurate, carry out also underusing during data query in the database pre- if breaking The value of Aggregation Table, influences search efficiency.
For search efficiency when carrying out data query in the relevant technologies in the database it is relatively low the problem of, not yet propose at present Effective solution.
Invention content
The main purpose of the application is to provide a kind of database aggregation processing method and device, to solve in the relevant technologies The problem of search efficiency is relatively low during data query is carried out in the database.
To achieve these goals, according to the one side of the application, a kind of database aggregation processing method is provided.It should Method includes:The dimension and index in the querying condition for inquiring database are obtained, wherein, index is the content of inquiry, is tieed up Spend the restrictive condition for limitation inquiry content;The corresponding equivalent index of each index in querying condition is searched, wherein, equivalence refers to The index being designated as in Aggregation Table, Aggregation Table are the table being polymerize to original tables of data;The equivalence found is referred to Mark judges whether include dimension in the Aggregation Table where equivalent index;If do not include dimension in the Aggregation Table where equivalent index Degree judges whether include dimension in target polymerization table, wherein, target polymerization table is that the Aggregation Table where equivalent index bridges it Table after table connection;In the case where the judgment result is yes, it is inquired in target polymerization table using equivalent index and dimension, And return to the result obtained after inquiry.
Further, in the case that an index in querying condition corresponds to multiple equivalent indexs, equivalent index is used Inquiry is carried out with dimension in target polymerization table to include:The target polymerization table where equivalent index is selected from multiple equivalent indexs The equivalent index of data volume expense minimum;It is carried out in the target polymerization table of data volume expense minimum using equivalent index and dimension Inquiry.
Further, in the case that an index in querying condition corresponds to multiple equivalent indexs, equivalent index is used Inquiry is carried out with dimension in Aggregation Table to include:By the target polymerization table where multiple equivalent indexs according to data volume expense from small To being ranked up greatly;Judge whether the dimension for including querying condition since the target polymerization table of data volume expense minimum, sentencing Disconnected result is in the case of being, is inquired in the target polymerization table of data volume expense minimum;In the feelings that judging result is no Under condition, judge whether include dimension in next target polymerization table again successively.
Further, the corresponding equivalent index of index is preconfigured, and the corresponding index of equivalent index is equal.
Further, in the case where target polymerization table is multiple, using equivalent index and dimension in target polymerization table Inquiry is carried out to include:The Aggregation Table of data volume expense minimum is selected from multiple target polymerization tables;Use all equivalent indexs It is inquired in the Aggregation Table of data volume expense minimum with dimension.
Further, it is added to prescribed particle size lower floor granularity data in the data record row of the prescribed particle size of target polymerization table Summarize row.
To achieve these goals, according to the another aspect of the application, a kind of database polymerization processing apparatus is provided.It should Device includes:Acquiring unit, for obtaining dimension and index in the querying condition for inquiring database, wherein, index is The content of inquiry, dimension are the restrictive condition of limitation inquiry content;Searching unit, for searching each index in querying condition Corresponding equivalence index, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is to original tables of data polymerize The table arrived;First judging unit, for for the equivalent index found, judging whether wrapped in the Aggregation Table where equivalent index Include dimension;Second judgment unit in the case of not including dimension in the Aggregation Table where equivalent index, judges that target is gathered It closes in table and whether includes dimension, wherein, target polymerization table is that the Aggregation Table where equivalent index bridges it the table after table connection; Query unit, in the case where the judgment result is yes, being inquired in target polymerization table using equivalent index and dimension, And return to the result obtained after inquiry.
Further, query unit includes:Selecting module corresponds to multiple equivalences for an index in querying condition In the case of index, the equivalence of the target polymerization table data volume expense minimum from multiple equivalent indexs where the equivalent index of selection Index;First enquiry module, for being looked into the target polymerization table of data volume expense minimum using equivalent index and dimension It askes.
Further, query unit includes:Sorting module corresponds to multiple equivalences for an index in querying condition In the case of index, the target polymerization table where multiple equivalent indexs is ranked up from small to large according to data volume expense;The Two enquiry modules, for judging whether the dimension for including querying condition since the target polymerization table of data volume expense minimum, Judging result is in the case of being, is inquired in the target polymerization table of data volume expense minimum;Judgment module, for sentencing In the case that disconnected result is no, judge whether include dimension in next target polymerization table again successively.
Further, the corresponding equivalent index of index is preconfigured, and the corresponding index of equivalent index is equal.
By the application, using following steps:The dimension and index in the querying condition for inquiring database are obtained, In, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;The each index searched in querying condition corresponds to Equivalent index, wherein, equivalent index be Aggregation Table in index, Aggregation Table is what original tables of data was polymerize Table;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;If equivalent index institute Aggregation Table in do not include dimension, judge in target polymerization table whether to include dimension, wherein, target polymerization table is equivalent index The Aggregation Table at place bridges it the table after table connection;In the case where the judgment result is yes, existed using equivalent index and dimension Inquired in target polymerization table, and return inquiry after obtain as a result, solving in the relevant technologies in the database into line number It is investigated that the problem of search efficiency is relatively low when asking.It is looked into Aggregation Table bridges it table by using equivalent index and dimension It askes, has fully used the value of Aggregation Table, and then reached the effect for promoting search efficiency when carrying out data query in the database Fruit.
Description of the drawings
The attached drawing for forming the part of the application is used for providing further understanding of the present application, the schematic reality of the application Example and its explanation are applied for explaining the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the flow chart according to database aggregation processing method provided by the embodiments of the present application;And
Fig. 2 is the schematic diagram according to database polymerization processing apparatus provided by the embodiments of the present application.
Specific embodiment
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order to which those skilled in the art is made to more fully understand application scheme, below in conjunction in the embodiment of the present application The technical solution in the embodiment of the present application is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people Member's all other embodiments obtained without making creative work should all belong to the model of the application protection It encloses.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, " Two " etc. be the object for distinguishing similar, and specific sequence or precedence are described without being used for.It should be appreciated that it uses in this way Data can be interchanged in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit Process, method, system, product or equipment are not necessarily limited to those steps or unit clearly listed, but may include without clear It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
According to an embodiment of the present application, a kind of database aggregation processing method is provided.
Fig. 1 is the flow chart according to the database aggregation processing method of the embodiment of the present application.As shown in Figure 1, this method packet Include following steps:
Step S101 obtains dimension and index in the querying condition for inquiring database, wherein, index is inquiry Content, dimension are the restrictive condition of limitation inquiry content.
For example, it is order volume and access of the first quarter to product A for inquiring the querying condition of database to get The restrictive condition of amount, the first quarter and product A as limitation inquiry content, the content of order volume and visit capacity as inquiry. That is, dimension is the first quarter and product A, index is order volume and visit capacity.
Step S102 searches the corresponding equivalent index of each index in querying condition, wherein, equivalent index is Aggregation Table In index, Aggregation Table is the table being polymerize to original tables of data.
Each index is the index in original tables of data in querying condition, and equivalent index is the index in Aggregation Table.It looks into The corresponding equivalent index of each index in querying condition is looked for, for example, the corresponding equivalence of order volume searched in querying condition refers to Mark.
Optionally, in database aggregation processing method provided by the embodiments of the present application, the corresponding equivalent index of index is Preconfigured, the corresponding index of equivalent index is equal.That is, by the index in querying condition in original tables of data In carry out inquiry and inquired in Aggregation Table with using its corresponding equivalent index, return obtained after inquiring the result is that identical 's.By the method for the dynamic replacement of index of equal value, the corresponding equivalent index of each index in querying condition is searched.
It should be noted that Aggregation Table in this application is according to preset condition polymerize to original tables of data The table arrived.For example, Aggregation Table is only arranged comprising limited dimension and index, so that the efficiency data query in Aggregation Table is more Soon.
Step S103 for the equivalent index found, judges whether include dimension in the Aggregation Table where equivalent index.
Include the dimension in querying condition due to the Aggregation Table where cannot ensure equivalent index, refer to finding equivalence After mark, judge whether include the dimension in querying condition in the Aggregation Table where equivalent index.For example, dimension is the first quarter With product A, after the corresponding equivalent index of order volume is found, the Aggregation Table where the corresponding equivalent index of order volume is judged In whether include querying condition in the dimension first quarter and product A.
It should be noted that dimension instruction mentioned in this application is all dimensions of the querying condition namely sentences Whether all dimensions in querying condition are included in Aggregation Table where disconnected equivalence index.
Step S104 if not including dimension in Aggregation Table where equivalent index, judges whether wrapped in target polymerization table Dimension is included, wherein, target polymerization table is that the Aggregation Table where equivalent index bridges it the table after table connection.
If not including all dimensions in querying condition in the Aggregation Table where equivalent index, judge in target polymerization table Whether all dimensions in querying condition are included, wherein, target polymerization table is that the Aggregation Table where equivalent index bridges it table Table after connection.
It should be noted that since index table can be appeared in arbitrary snowflake allocation list, being in enquiring component can To be converted to bridging table by the connection of snowflake allocation list, in this application can be arranged by the data of certain in Aggregation Table and it is predetermined The bridging table of granularity is connected, and in inquiry, carries out table with prepolymerization table by bridging table and connect, while bridged with this dimension It is inquired or is filtered on table.The table that Aggregation Table is bridged it after table connection is referred to as target polymerization table in this application, Aggregation Table bridges it a not necessarily table after table connection, but only Aggregation Table passes through connection relation and bridging table phase Even, target polymerization table in this application can also indicate that Aggregation Table connect by connection relation with bridging table after general name.
In the case of not including dimension in the Aggregation Table where equivalent index, dimension may be included in bridging table Degree, therefore whether judge in Aggregation Table and its bridging table where equivalent index including dimension.
Step S105 in the case where the judgment result is yes, is carried out using equivalent index and dimension in target polymerization table Inquiry, and return to the result obtained after inquiry.
In the case where the judgment result is yes, that is, Aggregation Table and its bridging table where equivalent index include dimension, Then it is inquired in target polymerization table using equivalent index and dimension, and returns to the result obtained after inquiry.
By above step, table is carried out with Aggregation Table by bridging table and is connect, is existed using equivalent index and dimension, is had and connect It connects in the bridging table and Aggregation Table of relationship and is inquired and filtered, reach consistent effect data, while can also apply Aggregation Table Acceleration, improve in the database carry out data query when search efficiency.
Optionally, in database aggregation processing method provided by the embodiments of the present application, a finger in querying condition In the case of the corresponding multiple equivalent indexs of mark, inquiry is carried out in target polymerization table using equivalent index and dimension and is included:From more The equivalent index of target polymerization table data volume expense minimum in a equivalence index where the equivalent index of selection;Use equivalent index It is inquired in the target polymerization table of data volume expense minimum with dimension.
It should be noted that an index in querying condition in this application corresponds to multiple equivalent indexs, expression It is the situation that some index in querying condition corresponds to multiple equivalent indexs.
For example, in the case of the corresponding multiple equivalent indexs of order volume (a certain index in querying condition), from order The equivalent index of the target polymerization table data volume expense minimum in corresponding multiple equivalent indexs where the equivalent index of selection is measured, with And it is inquired in the target polymerization table of data volume expense minimum using the corresponding equivalent index of order volume and dimension.
Optionally, in database aggregation processing method provided by the embodiments of the present application, a finger in querying condition In the case of the corresponding multiple equivalent indexs of mark, inquiry is carried out in Aggregation Table using equivalent index and dimension and included:It will be multiple etc. Target polymerization table where value index is ranked up from small to large according to data volume expense;Gather from the target of data volume expense minimum Conjunction table starts to judge whether the dimension for including querying condition, in the case where the judgment result is yes, minimum in data volume expense It is inquired in target polymerization table;Judging result in the case of no, judge again successively in next target polymerization table whether Including dimension.
For example, in the case of the corresponding multiple equivalent indexs of order volume (a certain index in querying condition), according to more Target polymerization table where a equivalence index selects the target polymerization table of data volume expense minimum, from number according to data volume expense Target polymerization table according to amount expense minimum starts to judge whether the dimension for including querying condition (that is, the first quarter and product A), In the case where the target polymerization table of data volume expense minimum includes the first quarter of querying condition and product A, opened in data volume It sells in the target polymerization table of minimum and is inquired.If the target polymerization table of data volume expense minimum does not include the of querying condition The first quarter and product A judge whether include the first quarter in querying condition and product in next target polymerization table successively again A in the case of determining that some target polymerization table includes the first quarter in querying condition and product A, gathers in the target It is inquired in conjunction table.
By carrying out data query from the pre- target polymerization table of expense minimum, guarantee also reaches while inquiring effect to be added The effect of fast data query.
Optionally, it is multiple in target polymerization table in database aggregation processing method provided by the embodiments of the present application In the case of, inquiry is carried out in target polymerization table using equivalent index and dimension and is included:Number is selected from multiple target polymerization tables According to the Aggregation Table of amount expense minimum;It is looked into the Aggregation Table of data volume expense minimum using all equivalent index and dimension It askes.
In the case where target polymerization table is multiple, the polymerization of data volume expense minimum is selected from multiple target polymerization tables Table;It is inquired in the target polymerization table of data volume expense minimum using all equivalent index and dimension, ensures inquiry effect Also achieve the effect that accelerate data query while fruit.
Optionally, in database aggregation processing method provided by the embodiments of the present application, the prescribed particle size of target polymerization table Data record row in be added to prescribed particle size lower floor granularity data summarize row.
Target polymerization table in this application can have several data granularity ranks, and similar to visitor, session, the page is clear Look at that (visitor there can be multiple sessions, and a session there are multiple page browsings again, thus there is a different granularities, and different Granularity can carry out table connection, as snowflake type), static fields are added on prescribed particle size, such as remember in the data of visitor It in record row, adds its corresponding session number and summarizes row, page browsing number summarizes row, can be used for calculating session number and the page respectively The two indexs of browsing number.
For being added on the target polymerization table of prescribed particle size, the more fine-grained all index row to add up of its lower floor are poly- Data obtained from conjunction arrange, and in the metadata configurations of inquiry layer, the data row that these are newly increased are carried out matching for equivalent index It puts.
Gathered by adding the more fine-grained index for being possible to or being often queried on the granularity table of prescribed particle size Row are closed, to achieve the purpose that Aggregation Table with bridging table being connected, before inquiry layer does equivalent index replacement, are preferentially judged whether It can be opened from one and all indexs be inquired above the minimum table of pin, and the table has relevant dimension to arrange, and reaches with this and fills Divide and Aggregation Table is utilized, while also ensure the search efficiency for carrying out data query in the database.
Database aggregation processing method provided by the embodiments of the present application, by obtaining the querying condition for inquiring database In dimension and index, wherein, index be inquiry content, dimension be limitation inquire content restrictive condition;Search inquiry item The corresponding equivalent index of each index in part, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is to original number The table being polymerize according to table;For the equivalent index found, judge whether include in the Aggregation Table where equivalent index Dimension;If not including dimension in the Aggregation Table where equivalent index, judge whether include dimension in target polymerization table, wherein, Target polymerization table is that the Aggregation Table where equivalent index bridges it the table after table connection;In the case where the judgment result is yes, Inquired in target polymerization table using equivalent index and dimension, and return inquiry after obtain as a result, solving related skill The problem of search efficiency is relatively low during data query is carried out in art in the database.By using equivalent index and dimension in Aggregation Table It bridges it in table and is inquired, fully used the value of Aggregation Table, and then reached promotion and carried out data in the database The effect of search efficiency during inquiry.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions It is performed in computer system, although also, show logical order in flow charts, it in some cases, can be with not The sequence being same as herein performs shown or described step.
The embodiment of the present application additionally provides a kind of database polymerization processing apparatus, it should be noted that the embodiment of the present application Database polymerization processing apparatus can be used for performing that the embodiment of the present application provided for database aggregation processing method.With Under database polymerization processing apparatus provided by the embodiments of the present application is introduced.
Fig. 2 is the schematic diagram according to the database polymerization processing apparatus of the embodiment of the present application.As shown in Fig. 2, the device packet It includes:Acquiring unit 10, searching unit 20, the first judging unit 30, second judgment unit 40 and query unit 50.
Specifically, acquiring unit 10, for obtaining dimension and index in the querying condition for inquiring database, In, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content.
Searching unit 20, for searching the corresponding equivalent index of each index in querying condition, wherein, equivalent index is Index in Aggregation Table, Aggregation Table are the table being polymerize to original tables of data.
First judging unit 30, for for the equivalent index found, judging to be in the Aggregation Table where equivalent index It is no including dimension.
Second judgment unit 40 in the case of not including dimension in the Aggregation Table where equivalent index, judges mesh It marks in Aggregation Table and whether includes dimension, wherein, after target polymerization table bridges it table connection for the Aggregation Table where equivalent index Table.
Query unit 50, in the case where the judgment result is yes, using equivalent index and dimension in target polymerization table In inquired, and return to obtained result after inquiry.
Database polymerization processing apparatus provided by the embodiments of the present application obtains to inquire database by acquiring unit 10 Querying condition in dimension and index, wherein, index be inquiry content, dimension be limitation inquire content restrictive condition; Searching unit 20 searches the corresponding equivalent index of each index in querying condition, wherein, equivalent index is the finger in Aggregation Table Mark, Aggregation Table is the table being polymerize to original tables of data;First judging unit 30 for the equivalent index that finds, Judge whether include dimension in the Aggregation Table where equivalent index;Second judgment unit 40 is in the Aggregation Table where equivalent index In the case of not including dimension, judge whether include dimension in target polymerization table, wherein, target polymerization table is equivalent index place Aggregation Table bridge it table connection after table;Query unit 50 in the case where the judgment result is yes, using equivalent index and Dimension is inquired in target polymerization table, and return inquiry after obtain as a result, solving in the relevant technologies in the database Carry out the problem of search efficiency is relatively low during data query.By using equivalent index and dimension in Aggregation Table bridges it table into Row inquiry, has fully used the value of Aggregation Table, and then has reached promotion and carried out search efficiency during data query in the database Effect.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, query unit 50 includes:Select mould Block, in the case of corresponding to multiple equivalent indexs for an index in querying condition, selection etc. from multiple equivalent indexs The equivalent index of target polymerization table data volume expense minimum where value index;First enquiry module, for using equivalent index It is inquired in the target polymerization table of data volume expense minimum with dimension.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, query unit 50 includes:Sort mould Block, in the case of corresponding to multiple equivalent indexs for an index in querying condition, by the mesh where multiple equivalent indexs Mark Aggregation Table is ranked up from small to large according to data volume expense;Second enquiry module, for from the mesh of data volume expense minimum Mark Aggregation Table starts to judge whether the dimension for including querying condition, in the case where the judgment result is yes, in data volume expense most It is inquired in small target polymerization table;Judgment module in the case of being no in judging result, judges next again successively Whether include dimension in target polymerization table.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, the corresponding equivalent index of index is Preconfigured, the corresponding index of equivalent index is equal.
The database polymerization processing apparatus includes processor and memory, above-mentioned acquiring unit 10, searching unit 20, the One judging unit 30, second judgment unit 40 and query unit 50 etc. are stored as program unit in memory, by handling Device performs above procedure unit stored in memory and realizes corresponding function.
Comprising kernel in processor, gone in memory to transfer corresponding program unit by kernel.Kernel can set one Or more, by adjusting kernel parameter processing database polymerization.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes at least one deposit Store up chip.
Present invention also provides a kind of embodiment of computer program product, when being performed on data processing equipment, fitting In the program code for performing initialization there are as below methods step:It obtains the dimension in the querying condition for inquiring database and refers to Mark, wherein, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;Search each finger in querying condition Corresponding equivalent index is marked, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is polymerize original tables of data Obtained table;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;It is if equivalent Do not include dimension in Aggregation Table where index, judge whether include dimension in target polymerization table, wherein, target polymerization table is etc. Aggregation Table where value index bridges it the table after table connection;In the case where the judgment result is yes, using equivalent index and Dimension is inquired in target polymerization table, and returns to the result obtained after inquiry.
It should be noted that for aforementioned each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the application is not limited by described sequence of movement because According to the application, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art should also know It knows, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Division of logic function, can there is an other dividing mode in actual implementation, such as multiple units or component can combine or can To be integrated into another system or some features can be ignored or does not perform.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
Obviously, those skilled in the art should be understood that each module of above-mentioned the application or each step can be with general Computing device realize that they can concentrate on single computing device or be distributed in multiple computing devices and be formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored In the storage device by computing device come perform either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the application be not limited to it is any specific Hardware and software combines.
The foregoing is merely the preferred embodiments of the application, are not limited to the application, for those skilled in the art For member, the application can have various modifications and variations.All any modifications within spirit herein and principle, made, Equivalent replacement, improvement etc., should be included within the protection domain of the application.

Claims (10)

1. a kind of database aggregation processing method, which is characterized in that including:
The dimension and index in the querying condition for inquiring database are obtained, wherein, the index is the content of inquiry, described Dimension is the restrictive condition of limitation inquiry content;
The corresponding equivalent index of each index in the querying condition is searched, wherein, the equivalence index is in Aggregation Table Index, the Aggregation Table are the table being polymerize to original tables of data;
For the equivalent index found, judge whether include the dimension in the Aggregation Table where the equivalent index;
If not including the dimension in the Aggregation Table where the equivalence index, judge whether to include in target polymerization table described Dimension, wherein, the target polymerization table bridges it the table after table connection for the Aggregation Table where the equivalent index;
In the case where the judgment result is yes, it is looked into the target polymerization table using the equivalent index and the dimension It askes, and returns to the result obtained after inquiry.
2. according to the method described in claim 1, it is characterized in that, an index in the querying condition correspond to it is multiple etc. In the case of being worth index, inquiry is carried out in the target polymerization table using the equivalent index and the dimension and is included:
The equivalent index of target polymerization table data volume expense minimum from the multiple equivalent index where the equivalent index of selection;
It is inquired in the target polymerization table of the data volume expense minimum using the equivalent index and the dimension.
3. according to the method described in claim 2, it is characterized in that, an index in the querying condition correspond to it is multiple etc. In the case of being worth index, inquiry is carried out in Aggregation Table using the equivalent index and the dimension and is included:
Target polymerization table where the multiple equivalent index is ranked up from small to large according to data volume expense;
Judge whether the dimension for including the querying condition since the target polymerization table of the data volume expense minimum, judging As a result in the case of being, to be inquired in the target polymerization table of the data volume expense minimum;
In the case where judging result is no, judge whether include the dimension in next target polymerization table again successively.
4. according to the method in any one of claims 1 to 3, which is characterized in that the corresponding equivalent index of the index is Preconfigured, the corresponding index of the equivalence index is equal.
5. according to the method in any one of claims 1 to 3, which is characterized in that in the target polymerization table to be multiple In the case of, inquiry is carried out in the target polymerization table using the equivalent index and the dimension and is included:
The Aggregation Table of data volume expense minimum is selected from multiple target polymerization tables;
It is inquired in the Aggregation Table of the data volume expense minimum using all equivalent indexs and the dimension.
6. according to the method in any one of claims 1 to 3, which is characterized in that the prescribed particle size of the target polymerization table Data record row in be added to prescribed particle size lower floor granularity data summarize row.
7. a kind of database polymerization processing apparatus, which is characterized in that including:
Acquiring unit, for obtaining dimension and index in the querying condition for inquiring database, wherein, the index is looks into The content of inquiry, the dimension are the restrictive condition of limitation inquiry content;
Searching unit, for searching the corresponding equivalent index of each index in the querying condition, wherein, the equivalence index For the index in Aggregation Table, the Aggregation Table is the table being polymerize to original tables of data;
First judging unit, for for the equivalent index found, judge in the Aggregation Table where the equivalent index whether Including the dimension;
Second judgment unit in the case of not including the dimension in the Aggregation Table where the equivalent index, judges Whether include the dimension in target polymerization table, wherein, the target polymerization table for the Aggregation Table where the equivalent index with Table after the connection of its bridging table;
Query unit, in the case where the judgment result is yes, using the equivalent index and the dimension in the target It is inquired in Aggregation Table, and returns to the result obtained after inquiry.
8. device according to claim 7, which is characterized in that the query unit includes:
Selecting module, in the case of corresponding to multiple equivalent indexs for an index in the querying condition, from described more The equivalent index of target polymerization table data volume expense minimum in a equivalence index where the equivalent index of selection;
First enquiry module, for using the equivalent index and the dimension in the target polymerization of the data volume expense minimum It is inquired in table.
9. device according to claim 8, which is characterized in that the query unit includes:
Sorting module, will be described more in the case of corresponding to multiple equivalent indexs for an index in the querying condition Target polymerization table where a equivalence index is ranked up from small to large according to data volume expense;
Second enquiry module, for judging whether to include the inquiry since the target polymerization table of the data volume expense minimum The dimension of condition in the case where the judgment result is yes, is inquired in the target polymerization table of the data volume expense minimum;
Judgment module in the case of being no in judging result, judges whether include in next target polymerization table successively again The dimension.
10. the device according to any one of claim 7 to 9, which is characterized in that the corresponding equivalent index of the index is Preconfigured, the corresponding index of the equivalence index is equal.
CN201611264048.9A 2016-12-30 2016-12-30 Database aggregation processing method and device Active CN108268523B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611264048.9A CN108268523B (en) 2016-12-30 2016-12-30 Database aggregation processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611264048.9A CN108268523B (en) 2016-12-30 2016-12-30 Database aggregation processing method and device

Publications (2)

Publication Number Publication Date
CN108268523A true CN108268523A (en) 2018-07-10
CN108268523B CN108268523B (en) 2021-06-22

Family

ID=62755266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611264048.9A Active CN108268523B (en) 2016-12-30 2016-12-30 Database aggregation processing method and device

Country Status (1)

Country Link
CN (1) CN108268523B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060118A (en) * 2019-02-27 2019-07-26 浙江执御信息技术有限公司 A kind of order is honoured an agreement full link method for real-time monitoring, device and computer equipment
CN112035173A (en) * 2020-11-04 2020-12-04 北京爱奇艺智能科技有限公司 Method and system for supporting multi-dimensional content aggregation display of VR (virtual reality) all-in-one machine
CN112445814A (en) * 2020-12-15 2021-03-05 北京乐学帮网络技术有限公司 Data acquisition method and device, computer equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020029207A1 (en) * 2000-02-28 2002-03-07 Hyperroll, Inc. Data aggregation server for managing a multi-dimensional database and database management system having data aggregation server integrated therein
US20050065756A1 (en) * 2003-09-22 2005-03-24 Hanaman David Wallace Performance optimizer system and method
CN101196890A (en) * 2006-12-08 2008-06-11 国际商业机器公司 Method and device for analyzing information and application performance during polymerized data base operation
CN101378932A (en) * 2005-11-04 2009-03-04 通用汽车环球科技运作公司 Active material actuated headrest assemblies
CN101876984A (en) * 2009-12-07 2010-11-03 金蝶软件(中国)有限公司 Data management system and data relation query method and device thereof
CN102012936A (en) * 2010-12-07 2011-04-13 中国电信股份有限公司 Massive data aggregation method and system based on cloud computing platform
CN102937980A (en) * 2012-10-18 2013-02-20 亿赞普(北京)科技有限公司 Method for inquiring data of cluster database
CN103853818A (en) * 2014-02-12 2014-06-11 博易智软(北京)技术股份有限公司 Multidimensional data processing method and device
CN103975556A (en) * 2011-11-22 2014-08-06 瑞典爱立信有限公司 Improved replication management for remote multicast replication network
CN104317958A (en) * 2014-11-12 2015-01-28 北京国双科技有限公司 Method and system for processing data in real time
CN104484398A (en) * 2014-12-12 2015-04-01 北京国双科技有限公司 Method and device for aggregation of data in datasheet
CN105183769A (en) * 2015-07-31 2015-12-23 浙江工商大学 In-situ visualization method for trajectory data based on stream data cube

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020029207A1 (en) * 2000-02-28 2002-03-07 Hyperroll, Inc. Data aggregation server for managing a multi-dimensional database and database management system having data aggregation server integrated therein
US20050065756A1 (en) * 2003-09-22 2005-03-24 Hanaman David Wallace Performance optimizer system and method
CN101378932A (en) * 2005-11-04 2009-03-04 通用汽车环球科技运作公司 Active material actuated headrest assemblies
CN101196890A (en) * 2006-12-08 2008-06-11 国际商业机器公司 Method and device for analyzing information and application performance during polymerized data base operation
CN101876984A (en) * 2009-12-07 2010-11-03 金蝶软件(中国)有限公司 Data management system and data relation query method and device thereof
CN102012936A (en) * 2010-12-07 2011-04-13 中国电信股份有限公司 Massive data aggregation method and system based on cloud computing platform
CN103975556A (en) * 2011-11-22 2014-08-06 瑞典爱立信有限公司 Improved replication management for remote multicast replication network
CN102937980A (en) * 2012-10-18 2013-02-20 亿赞普(北京)科技有限公司 Method for inquiring data of cluster database
CN103853818A (en) * 2014-02-12 2014-06-11 博易智软(北京)技术股份有限公司 Multidimensional data processing method and device
CN104317958A (en) * 2014-11-12 2015-01-28 北京国双科技有限公司 Method and system for processing data in real time
CN104484398A (en) * 2014-12-12 2015-04-01 北京国双科技有限公司 Method and device for aggregation of data in datasheet
CN105183769A (en) * 2015-07-31 2015-12-23 浙江工商大学 In-situ visualization method for trajectory data based on stream data cube

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SI XIAOSHENG 等: "Fault prediction model based on evidential reasoning approach", 《SCIENCE CHINA(INFORMATION SCIENCES)》 *
大圆那些事: "Mondrian中聚合表的应用", 《HTTPS://WWW.CNBLOGS.COM/PANFENG412/ARCHIVE/2012/03/25/MONDRIAN-AGGREGATE-TABLE.HTML》 *
胡雅颖等: "基于物化视图的查询系统研究与实现", 《计算机工程与科学》 *
贾东: "数据仓库技术在银行信贷管理信息系统中的应用", 《信息技术》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060118A (en) * 2019-02-27 2019-07-26 浙江执御信息技术有限公司 A kind of order is honoured an agreement full link method for real-time monitoring, device and computer equipment
CN112035173A (en) * 2020-11-04 2020-12-04 北京爱奇艺智能科技有限公司 Method and system for supporting multi-dimensional content aggregation display of VR (virtual reality) all-in-one machine
CN112035173B (en) * 2020-11-04 2021-03-05 北京爱奇艺智能科技有限公司 Method and system for supporting multi-dimensional content aggregation display of VR (virtual reality) all-in-one machine
CN112445814A (en) * 2020-12-15 2021-03-05 北京乐学帮网络技术有限公司 Data acquisition method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108268523B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN104580027B (en) A kind of OpenFlow message forwarding methods and equipment
JP6336974B2 (en) Method and apparatus for recommending clothing products
CN108897761A (en) A kind of clustering storage method and device
CN104408640B (en) Application software recommends method and device
EP2732416A2 (en) System and method for advertisement placement
US20140019451A1 (en) Multi-language document clustering
JP6243045B2 (en) Graph data query method and apparatus
CN108369594A (en) Method and apparatus for executing parallel search operation
CN102298650B (en) Distributed recommendation method of massive digital information
CN108268523A (en) Database aggregation processing method and device
CN104298541A (en) Data distribution algorithm and data distribution device for cloud storage system
CN106294815B (en) A kind of clustering method and device of URL
CN107832444A (en) Event based on search daily record finds method and device
CN103714098A (en) Method and system used for sectioning data base
CN110276060A (en) The method and device of data processing
CN104636368B (en) Data retrieval method, device and server
CN110532273A (en) The processing method and processing device of tables of data, storage medium, electronic device
CN103500168A (en) Method and system for discovering communities in overlapped complex networks according to topology potential
CN111241350A (en) Graph data query method and device, computer equipment and storage medium
CN109885651A (en) A kind of question pushing method and device
CN110019337A (en) Determine methods, devices and systems efficient zoned in database
CN109753504A (en) Data query method and device
CN113987002A (en) Data exchange method based on mass data analysis platform
CN108154024B (en) Data retrieval method and device and electronic equipment
CN106649385B (en) Data reordering method and device based on HBase database

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant