CN105447098B - A kind of information query method and device - Google Patents
A kind of information query method and device Download PDFInfo
- Publication number
- CN105447098B CN105447098B CN201510765199.1A CN201510765199A CN105447098B CN 105447098 B CN105447098 B CN 105447098B CN 201510765199 A CN201510765199 A CN 201510765199A CN 105447098 B CN105447098 B CN 105447098B
- Authority
- CN
- China
- Prior art keywords
- condition
- dimension
- group
- logical relation
- condition group
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a kind of information query method and device, wherein method need to pre-define dimension tree, dimension tree has multiple hierarchy nodes, the corresponding dimension type of one hierarchy node, one hierarchy node has multiple leaf nodes, a dimension condition under the corresponding affiliated dimension type of a leaf node;Method includes: to choose dimension condition from dimension tree at least one condition group is added, and a condition group has at least one dimension condition;It determines the logical relation between each dimension condition of each condition group, and determines that the logical relation between each condition group is or, obtaining if-clause;The content being consistent with the if-clause is inquired in background data base.Simultaneously, dimension condition in dimension tree can be dragged to setting regions by the application, and show the dimension condition selected in a manner of row, column, so that the exhibition method that user passes through row, column, there can be clear understanding to the relationship selected dimension condition, better understand selected dimension condition.
Description
Technical field
The present invention relates to technical field of data processing, and in particular to a kind of information query method and device.
Background technique
With the development of computer and network technology, all trades and professions are all gradually information-based, and big data era is stepped into the whole world, such as
What finds out desired information from database (such as information table) becomes a major issue of everybody concern.
Presently, there are a kind of information inquiry mode that various dimensions condition is inquired side by side, wherein dimension (conditional dimension) be for
One generic attribute of reflection business, the set of this generic attribute constitute a dimension, dimension such as gender, transaction stroke count etc.;And dimension item
Part is the conditional expression of a dimension, such as gender=" male ", transaction stroke count > 15;The information that various dimensions condition is inquired side by side
Inquiry mode mainly selects multiple dimension condition inquiry databases, and Fig. 1 is the schematic diagram of multiple dimension conditions, be can refer to, electricity
Selected multiple dimension conditions can be matched the content for meeting each dimension condition by sub- equipment in background data base, to obtain
Query result.
The present inventor has found that the dimension that various dimensions condition is inquired side by side is usually fixation in the course of the research,
It cannot change, each dimension can only choose a dimension condition, cannot accomplish more complicated, more fine-grained information inquiry.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of information query method and device, to realize the customized of dimension, and
It realizes the selection of multiple dimension conditions with dimension, so that the selection of various dimensions condition is more flexible, meets complicated, fine granularity
Information query demand.
To achieve the above object, the embodiment of the present invention provides the following technical solutions:
A kind of information query method, pre-defines the dimension type of each hierarchy node of dimension tree, and defines each level section
The dimension condition of the leaf node of point;Wherein, the dimension tree has multiple hierarchy nodes, the corresponding dimension of a hierarchy node
Type is spent, a hierarchy node has multiple leaf nodes, a dimension under the corresponding affiliated dimension type of a leaf node
Condition;The described method includes:
Dimension condition being chosen from the dimension tree, at least one condition group being added, a condition group is at least one dimension
Degree condition;
It determines the logical relation between each dimension condition of each condition group, and determines that the logical relation between each condition group is
Or, obtaining if-clause;
The content being consistent with the if-clause is inquired in background data base.
Wherein, the logical relation between each dimension condition of each condition group of the determination includes:
According to user when choosing dimension condition defined logical relation, between each dimension condition for determining each condition group
Logical relation;
Or, according to user in the corresponding dimension condition of definition leaf node, the logical relation of defined dimension condition,
Determine the logical relation between each dimension condition of each condition group.
Wherein, the dimension condition of choosing from the dimension tree is added at least one condition group and includes:
Dimension condition selected in the dimension tree is dragged to setting regions, the setting regions is divided at least one
A condition group region, the corresponding condition group in a condition group region;
The corresponding condition group in condition group region that dimension condition is dragged to is determined as the condition of dimension condition addition
Group.
Wherein, the method also includes:
The dimension condition of identical conditions group is arranged in same a line;Wherein, with patrolling between the independent dimension condition of a line
Volume relationship is and the logical relation between multiple dimension conditions in the same sub- column of described same a line is or, described same a line
Multiple dimension conditions in same sub- column are considered as an independent dimension condition;
Different rows is arranged in different condition groups;Wherein, the logical relation for the condition group that do not go together be or.
Wherein, the method also includes:
The dimension condition of identical conditions group is arranged in same row;Wherein, patrolling between the independent dimension condition of same row
Volume relationship is and the logical relation between multiple dimension conditions in the same sub-line of the same row is or, the same row
Multiple dimension conditions in same sub-line are considered as an independent dimension condition;
Different column are arranged in different condition groups;Wherein, be arranged the condition group of different lines logical relation be or.
The embodiment of the present invention also provides a kind of information query device, comprising:
Dimension tree definition module, the dimension type of each hierarchy node for pre-defining dimension tree, and define each level
The dimension condition of the leaf node of node;Wherein, the dimension tree has multiple hierarchy nodes, and a hierarchy node is one corresponding
Dimension type, a hierarchy node have multiple leaf nodes, a dimension under the corresponding affiliated dimension type of a leaf node
Degree condition;
Dimension condition chooses module, for from the dimension tree selection dimension condition be added at least one condition group, one
A condition group has at least one dimension condition;
If-clause determining module, the logical relation between each dimension condition for determining each condition group, and determine each item
Logical relation between part group is or, obtaining if-clause;
Enquiry module, for inquiring the content being consistent with the if-clause in background data base.
Wherein, the if-clause determining module includes:
Logic determination unit in condition group, for according to user when choosing dimension condition defined logical relation, really
Logical relation between each dimension condition of fixed each condition group;Or, according to user in the corresponding dimension condition of definition leaf node,
The logical relation of defined dimension condition determines the logical relation between each dimension condition of each condition group;
Logic determination unit between condition group, for determine the logical relation between each condition group be or,
For the logical relation between each dimension condition that each condition group has been determined, and each item is arranged in clause's determination unit
Logical relation between part group be or after, parsing by each condition group each dimension condition, with each condition group constitute condition tree knot
Structure obtains if-clause.
Wherein, the dimension condition selection module includes:
Unit is pulled, for dimension condition selected in the dimension tree to be dragged to setting regions, the setting area
Domain is divided at least one condition group region, the corresponding condition group in a condition group region;
Condition group determination unit, the corresponding condition group in condition group region for dimension condition to be dragged to, is determined as
The condition group that dimension condition is added.
Wherein, described device further include:
First arrangement module, for being arranged the dimension condition of identical conditions group in same a line;Wherein, with the independence of a line
Dimension condition between logical relation be with the logical relation between multiple dimension conditions in the same sub- column of described same a line is
Or, multiple dimension conditions in the same sub- column of described same a line are considered as an independent dimension condition;By different condition groups
Different rows is set;Wherein, the logical relation for the condition group that do not go together be or.
Wherein, described device further include:
Second arrangement module, for being arranged the dimension condition of identical conditions group in same row;Wherein, the independence of same row
Dimension condition between logical relation be with the logical relation between multiple dimension conditions in the same sub-line of the same row is
Or, multiple dimension conditions in the same sub-line of the same row are considered as an independent dimension condition;By different condition groups
Different column are set;Wherein, the logical relation of the condition group of different lines be or.
Based on the above-mentioned technical proposal, in information query method provided in an embodiment of the present invention, the condition of querying condition is formed
The dimension condition that clause is included can be chosen from the customized dimension tree of user, and the dimension type and dimension item of dimension tree
Part can be customized by users, it is achieved that the customized and dimension condition of inquiry dimension is customized, while same dimension
Different dimensions condition can be chosen in identical conditions group or different condition group, and multiple condition groups can inquire side by side, make
Obtaining the various dimensions condition that querying condition is included more can flexibly choose, and realize more complicated, more fine-grained information inquiry.
Information query method provided in an embodiment of the present invention may be implemented the customized of dimension, and realize multiple dimensions with dimension
The selection of condition meets complicated, fine-grained information query demand so that the selection of various dimensions condition is more flexible.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the schematic diagram of multiple dimension conditions;
Fig. 2 is the structural schematic diagram of dimension tree provided in an embodiment of the present invention;
Fig. 3 is the flow chart of information query method provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram that condition group is added in selection dimension condition provided in an embodiment of the present invention;
Fig. 5 is the arrangement method flow chart of dimension condition in condition group provided in an embodiment of the present invention;
Fig. 6 is the specific arrangement schematic diagram of dimension condition in condition group provided in an embodiment of the present invention;
Fig. 7 is another arrangement method flow chart of dimension condition in condition group provided in an embodiment of the present invention;
Fig. 8 is another flow chart of information query method provided in an embodiment of the present invention;
Fig. 9 is the schematic diagram of the application examples of information query method provided in an embodiment of the present invention;
Figure 10 is the structural block diagram of information query device provided in an embodiment of the present invention;
Figure 11 is the structural block diagram of if-clause determining module provided in an embodiment of the present invention;
Figure 12 is the structural block diagram that dimension condition provided in an embodiment of the present invention chooses module;
Figure 13 is another structural block diagram of information query device provided in an embodiment of the present invention;
Figure 14 is another structural block diagram of information query device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Multiple dimensions that information query method provided in an embodiment of the present invention needs pre-defined dimension tree expressed, and it is each
The corresponding multiple dimension conditions of dimension;Fig. 2 shows the structural schematic diagrams of dimension tree, as shown in Fig. 2, dimension tree has root section
Point, root node are arranged with multiple hierarchy nodes, and a hierarchy node corresponds to a dimension type, and dimension type is as shown in Figure 2
Dimension 1, dimension 2, dimension M etc., dimension type can be gender, age etc., and a hierarchy node is arranged with multiple leaf sections
Point, a leaf node correspond under affiliated dimension type (affiliated dimension type is corresponding to the hierarchy node where leaf node)
One dimension condition, dimension condition 1 condition 1 of dimension as shown in Figure 2,1 condition 2 of dimension etc., the dimension of dimension condition such as gender
The contents such as the male under type;
The level of dimension tree can extend or reduce according to practical situations, as the level of dimension tree can be 4 layers, 5 layers
Or more;
In embodiments of the present invention, the corresponding dimension type of the hierarchy node of dimension tree can be customized by the user, level
The corresponding dimension condition of each leaf node under node can also be customized by the user;
Optionally, in the corresponding dimension condition of each leaf node of definition, user can only define the specific interior of dimension condition
Hold, the particular content for such as defining the dimension condition of the leaf node of this dimension type of age is male or female;
Further, in the corresponding dimension condition of each leaf node of definition, user is except the particular content for defining dimension condition
Outside, also can define dimension condition it is called when, the logical relation that uses;Such as when the particular content of dimension condition is arranged,
Further the called logical relation of setting dimension condition is "AND" or "or";
Obviously, the logical relation that the corresponding dimension condition of leaf node uses, can also in information query process,
When the dimension condition is called, by user setting;
As can be seen that information query method provided in an embodiment of the present invention before execution, need to pre-define each of dimension tree
The dimension type of hierarchy node, and define the dimension condition of the leaf node of each hierarchy node;Wherein, the dimension tree has more
A hierarchy node, the corresponding dimension type of a hierarchy node, a hierarchy node have multiple leaf nodes, a leaf
A dimension condition under dimension type belonging to node is corresponding;
Based on this, Fig. 3 shows the flow chart of information query method provided in an embodiment of the present invention, and this method can be applied to
Computer etc. has the electronic equipment of data-handling capacity, and referring to Fig. 3, this method may include:
Step S100, dimension condition being chosen from dimension tree, at least one condition group being added, a condition group has at least
One dimension condition;
The embodiment of the present invention can be in the interface display setting regions of electronic equipment, by dragging the dimension condition in dimension tree
It is pulled in setting regions, to realize the selection to dimension condition;As shown in figure 4, setting regions can be divided at least one condition
Group region, the corresponding condition group in a condition group region, condition group may be considered the condition being made of multiple dimension conditions
Set;Setting regions can be boxed area, or the region of other shapes;
After dimension condition is dragged to setting regions, it can recognize that the position that dimension condition is pulled is corresponding in setting regions
Condition group region, so that the corresponding condition group in condition group region that dimension condition is dragged to, is determined as dimension condition and adds
The condition group entered;
In embodiments of the present invention, condition group is at least one, it can an only condition group can also have multiple
Part group, dimension condition are chosen after getting condition group, and a condition group can have at least one dimension condition (one or more);
Optionally, except illustrated above by the way of pulling the dimension condition to condition group region in dimension tree, the present invention
Other modes that dimension condition is added to condition group are not precluded in embodiment, such as user determines dimension tree by menu mode
The condition group etc. that the dimension condition of middle selection should be added.
Step S110, it determines the logical relation between each dimension condition of each condition group, and determines the logic between each condition group
Relationship is or, obtaining if-clause;
After condition group is added in dimension condition, the dimension condition in condition group will be used for formation condition clause, in order to subsequent
Carry out the inquiry of information in the database by if-clause;The embodiment of the present invention need to determine in condition group between each dimension condition
Logical relation, the logical relation in condition group between each dimension condition can be customized by the user, can also be according to setting rule really
It is fixed;Logical relation in condition group between each dimension condition is mainly "AND" or "or";
Optionally, the logical relation between each dimension condition that each condition group has been determined, and patrolling between each condition group is set
Volume relationship be or after, the available each dimension condition by each condition group of the embodiment of the present invention, the condition tree constituted with each condition group
Structure can obtain if-clause for inquiry by parsing the condition tree construction;
Obviously, the logical relation between each dimension condition that each condition group has been determined, and the logic being arranged between each condition group
Relationship be or after, the embodiment of the present invention can also directly analyze the logical relation between each dimension condition of each condition group, with each condition
Between group or logical relation, analyzes if-clause.
Step S120, the content being consistent with the if-clause is inquired in background data base.
After obtaining if-clause, the embodiment of the present invention can inquire the content being consistent with if-clause in the database, obtain
To query result;
The embodiment of the present invention can realize the inquiry arranged side by side of many condition group, obtain the query result arranged side by side of many condition group.
Information query method provided in an embodiment of the present invention need to pre-define the dimension class of each hierarchy node of dimension tree
Type, and define the dimension condition of the leaf node of each hierarchy node;Wherein, the dimension tree have multiple hierarchy nodes, one
Hierarchy node corresponds to a dimension type, and a hierarchy node has multiple leaf nodes, the corresponding affiliated dimension of a leaf node
Spend a dimension condition under type;When carrying out information inquiry, the embodiment of the present invention can choose dimension from the dimension tree
At least one condition group is added in condition, and a condition group has at least one dimension condition;Determine each dimension item of each condition group
Logical relation between part, and determine that the logical relation between each condition group is or, obtaining if-clause;It is inquired in background data base
The content being consistent with the if-clause.
As can be seen that the if-clause for forming querying condition is wrapped in information query method provided in an embodiment of the present invention
The dimension condition contained can be chosen from the customized dimension tree of user, and the dimension type and dimension condition of dimension tree can be by
User is customized, it is achieved that the customized and dimension condition of inquiry dimension is customized, while with the different dimensional of dimension
Degree condition can be chosen in identical conditions group or different condition group, and multiple condition groups can inquire side by side, so that inquiry item
The various dimensions condition that part is included more can flexibly be chosen, and realize more complicated, more fine-grained information inquiry.The present invention is real
The information query method for applying example offer may be implemented the customized of dimension, and realize the choosing of multiple dimension conditions with dimension
It takes, so that the selection of various dimensions condition is more flexible, meets complicated, fine-grained information query demand.
Optionally, the logical relation between each dimension condition of each condition group can determine according to user when choosing dimension condition
The logical relation of justice is determining, or, can be according to user in the corresponding dimension condition of definition leaf node, defined dimension condition
Logical relation, determine the logical relation between each dimension condition of each condition group;The practical operation feelings of concrete mode visual user
Depending on condition.
Optionally, no matter the embodiment of the present invention uses user's defined logical relation when choosing dimension condition, still
For user in the corresponding dimension condition of definition leaf node, the logical relation of defined dimension condition determines each condition group
Logical relation between each dimension condition, or, the logical relation between each dimension condition of each condition group is defined using other modes,
The embodiment of the present invention can define in condition group in a manner of row, column and show the dimension condition selected;
Correspondingly, Fig. 5 shows the arrangement method flow chart of dimension condition in condition group provided in an embodiment of the present invention, ginseng
According to Fig. 5, this method may include:
Step S200, the dimension condition of identical conditions group is arranged in same a line;Wherein, with the independent dimension item of a line
Logical relation between part is and the logical relation between multiple dimension conditions in the same sub- column of described same a line is or, described
It is considered as an independent dimension condition with multiple dimension conditions in the same sub- column of a line;;
Step S210, different rows is arranged in different condition groups;Wherein, the logical relation for the condition group that do not go together is
Or.
Fig. 6 shows the specific arrangement schematic diagram of dimension condition in condition group, and referring to Fig. 6, user is as needed by dimension
After dimension condition in tree is dragged to setting regions, at least one condition group will be formed, with the shape of condition tree between each condition group
Formula constructs the relationship in relationship and condition group between each condition group between each dimension condition;It can be with the side of row, column by condition tree
Formula defines and shows the dimension condition selected;Wherein, with logical "and" relationship is indicated between the independent dimension condition of a line, this is same
Logical "or" relationship is indicated in a line between the dimension condition of same sub- column, without indicating that logical "or" is closed with dimension condition in the ranks
System;
Independent dimension condition is that there are the dimension items of relationship for dimension condition whole with other as a whole in condition group
Part set (may only have a dimension condition, it is also possible to have multiple dimension conditions) in set, as " 1 condition 1 of dimension " is in Fig. 6
One independent dimension condition, and " 2 condition 2or dimension of dimension, 2 condition 5 " is dimension condition whole with other as a whole
(such as " 1 condition 1 of dimension ") there are relationships, and therefore " 2 condition 2or dimension of dimension, 2 condition 5 " is considered as an entirety, " 2 condition of dimension
2 condition of 2or dimension 5 " is whole to be used as an independent dimension condition;Optionally, the specific dimension for including in independent dimension condition
Degree condition can be specified when user chooses dimension condition from dimension tree;
As shown in fig. 6, " 1 condition 1 of dimension " and " 8 condition 2 of dimension ", in same a line, the relationship between them is logic
"AND";" 2 condition 2 of dimension " and " 2 condition 5 of dimension " in the same sub- column of same a line, they are integrally used as an independent dimension
Condition, therefore the relationship between them is logical "or";It is arranged in rows between condition group, intergroup relation is all logical "or";Wherein
" 7 condition self-defining value of dimension " indicate user selection be hierarchy node " dimension 7 ", then input customized dimension condition value and
Logical relation symbol;
As can be seen that the if-clause of Fig. 6 expression is (1 condition 1and of dimension (2 condition 2or dimension of dimension, 2 condition 5) and
7 condition self-defining value of (8 condition 2or dimension of dimension, 2 condition 5) and dimension) or (4 condition 3and dimension of dimension, 5 condition 1and (dimension
Spend 6 condition 1or dimension, 7 condition 1or dimension, 6 condition 3)) or (3 condition 1 of dimension), wherein and indicates logical "and", and or expression is patrolled
Collect "or";The embodiment of the present invention can parse if-clause from condition tree to pass to backstage, realize the inquiry of information.
Optionally, the relationship that the embodiment of the present invention may also set up between the dimension condition of same a line is logical "or", so that item
Part component is by column arrangement, and intergroup relation is logical "or";And the relationship between the dimension condition of same row is logical "and";
Specifically, Fig. 7 shows another arrangement method process of dimension condition in condition group provided in an embodiment of the present invention
Figure, referring to Fig. 7, this method may include:
Step S300, the dimension condition of identical conditions group is arranged in same row;Wherein, the independent dimension item of same row
Logical relation between part is and the logical relation between multiple dimension conditions in the same sub-line of the same row is or, described
Multiple dimension conditions in the same sub-line of same row are considered as an independent dimension condition;
Step S310, different column are arranged in different condition groups;Wherein, the logical relation of the condition group of different lines is
Or.
Preferably, Fig. 8 shows another flow chart of information query method provided in an embodiment of the present invention, and this method is based on
The dimension type of each hierarchy node of pre-defined dimension tree, and define the feelings of the dimension condition of the leaf node of each hierarchy node
Condition;Wherein, the dimension tree has multiple hierarchy nodes, the corresponding dimension type of a hierarchy node, a hierarchy node
A dimension condition with multiple leaf nodes, under the corresponding affiliated dimension type of a leaf node;
Referring to Fig. 8, this method may include:
Step S400, dimension condition selected in dimension tree is dragged to setting regions, the setting regions is divided into
At least one condition group region, the corresponding condition group in a condition group region;
Step S410, the corresponding condition group in condition group region for being dragged to dimension condition, is determined as dimension condition and adds
The condition group entered, a condition group have at least one dimension condition;
Step S420, by the dimension condition setting of identical conditions group in same a line, and the independent dimension with a line is set
Logical relation between condition is and the logical relation between multiple dimension conditions in the same sub- column of described same a line is or, institute
It states multiple dimension conditions in the same sub- column of same a line and is considered as an independent dimension condition, and different condition groups is arranged
In different rows, and the logical relation that the condition group that do not go together is arranged is or, to construct condition tree;
Step S430, the condition tree is parsed, if-clause corresponding with querying condition is obtained;
Step S440, the content being consistent with the if-clause is inquired in background data base.
Optionally, Fig. 9 shows the application examples of information query method provided in an embodiment of the present invention, as shown in figure 9, looking into
Under the scene for asking certain month client credit card consumption information, Fig. 9 lists several dimensions and condition value;It is a dimension on the left of Fig. 9
Degree tree, listed dimension has age, gender, credit card trade stroke count and consumption type, interior joint " age≤22 " are a dimensions
Degree condition;It is the one query generated after pulling on the right side of Fig. 9, dimension condition is divided into two groups, according to rule, the if-clause of expression
It is: (age≤22 and (gender=male's or credit card trade stroke count > 8) and consumption type=food and drink class consumption) or (age >
(consumption type=jewelry consumption or consumption type=food and drink class consumption or's 30 3 < credit card trade of and stroke counts≤8and disappears
Take type=general merchandise class consumption)).
Information query method provided in an embodiment of the present invention may be implemented the customized of dimension, and realize with dimension
The selection of multiple dimension conditions meets the letter of complicated inquiry scene or report so that the selection of various dimensions condition is more flexible
Cease query demand.
Information query device provided in an embodiment of the present invention is introduced below, information query device described below can
Reference is corresponded to each other with above-described information query method.
Figure 10 is the structural block diagram of information query device provided in an embodiment of the present invention, which can be applied to computer etc.
Electronic equipment with data-handling capacity, referring to Fig.1 0, the apparatus may include:
Dimension tree definition module 100, the dimension type of each hierarchy node for pre-defining dimension tree, and define each layer
The dimension condition of the leaf node of grade node;Wherein, the dimension tree has multiple hierarchy nodes, a hierarchy node corresponding one
A dimension type, a hierarchy node have multiple leaf nodes, and a leaf node corresponds to one under affiliated dimension type
Dimension condition;
Dimension condition chooses module 200, at least one condition group is added for choosing dimension condition from the dimension tree,
One condition group has at least one dimension condition;
If-clause determining module 300, the logical relation between each dimension condition for determining each condition group, and determine each
Logical relation between condition group is or, obtaining if-clause;
Enquiry module 400, for inquiring the content being consistent with the if-clause in background data base.
Optionally, Figure 11 shows a kind of alternative construction of if-clause determining module 300 provided in an embodiment of the present invention,
Referring to Fig.1 1, if-clause determining module 300 may include:
Logic determination unit 310 in condition group, for according to user when choosing dimension condition defined logical relation,
Determine the logical relation between each dimension condition of each condition group;Or, defining the corresponding dimension condition of leaf node according to user
When, the logical relation of defined dimension condition determines the logical relation between each dimension condition of each condition group;
Logic determination unit 320 between condition group, for determine the logical relation between each condition group be or,
Clause's determination unit 330 for the logical relation between each dimension condition that each condition group has been determined, and is arranged each
Logical relation between condition group be or after, parsing by each condition group each dimension condition, with each condition group constitute condition tree
Structure obtains if-clause.
Optionally, Figure 12 shows a kind of alternative construction that dimension condition provided in an embodiment of the present invention chooses module 200,
Referring to Fig.1 2, which chooses module 200 and may include:
Unit 210 is pulled, for dimension condition selected in the dimension tree to be dragged to setting regions, the setting
Region division is at least one condition group region, the corresponding condition group in a condition group region;
Condition group determination unit 220, the corresponding condition group in condition group region for dimension condition to be dragged to determine
The condition group being added for dimension condition.
Optionally, Figure 13 shows another structural block diagram of information query device provided in an embodiment of the present invention, in conjunction with figure
Shown in 10 and Figure 13, which can also include:
First arrangement module 500, for being arranged the dimension condition of identical conditions group in same a line;Wherein, with a line
Logical relation between independent dimension condition is and the logic between multiple dimension conditions in the same sub- column of described same a line is closed
System is or, multiple dimension conditions in the same sub- column of described same a line are considered as an independent dimension condition;By different items
Different rows is arranged in part group;Wherein, the logical relation for the condition group that do not go together be or.
Optionally, Figure 14 shows another structural block diagram of information query device provided in an embodiment of the present invention, in conjunction with figure
Shown in 10 and Figure 14, which can also include:
Second arrangement module 600, for being arranged the dimension condition of identical conditions group in same row;Wherein, same row
Logical relation between independent dimension condition is and the logic between multiple dimension conditions in the same sub-line of the same row is closed
System is or, multiple dimension conditions in the same sub-line of the same row are considered as an independent dimension condition;By different items
Different column are arranged in part group;Wherein, the logical relation of the condition group of different lines be or.
Information query device provided in an embodiment of the present invention may be implemented the customized of dimension, and realize with dimension
The selection of multiple dimension conditions meets the letter of complicated inquiry scene or report so that the selection of various dimensions condition is more flexible
Cease query demand.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part
It is bright.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (8)
1. a kind of information query method, which is characterized in that the dimension type of each hierarchy node of pre-defined dimension tree, and define
The dimension condition of the leaf node of each hierarchy node;Wherein, the dimension tree has multiple hierarchy nodes, a hierarchy node pair
A dimension type is answered, a hierarchy node has multiple leaf nodes, and a leaf node corresponds under affiliated dimension type
One dimension condition;The described method includes:
Dimension condition being chosen from the dimension tree, at least one condition group being added, a condition group has at least one dimension item
Part;
It determines the logical relation between each dimension condition of each condition group, and determines that the logical relation between each condition group is or, obtaining
To if-clause;
The content being consistent with the if-clause is inquired in background data base;
Wherein, the logical relation between each dimension condition of each condition group of the determination includes:
According to user when choosing dimension condition defined logical relation, determine the logic between each dimension condition of each condition group
Relationship;
Or, the logical relation of defined dimension condition determines according to user in the corresponding dimension condition of definition leaf node
Logical relation between each dimension condition of each condition group;
Logical relation between each condition group of determination is or, obtaining if-clause and including:
Determine the logical relation between each condition group be or;
Logical relation between each dimension condition that each condition group has been determined, and the logical relation being arranged between each condition group be or
Afterwards, each dimension condition by each condition group is parsed, the condition tree construction constituted with each condition group obtains if-clause.
2. information query method according to claim 1, which is characterized in that described to choose dimension item from the dimension tree
At least one condition group is added in part
Dimension condition selected in the dimension tree is dragged to setting regions, the setting regions is divided at least one
Part group region, the corresponding condition group in a condition group region;
The corresponding condition group in condition group region that dimension condition is dragged to is determined as the condition group of dimension condition addition.
3. information query method according to claim 1, which is characterized in that the method also includes:
The dimension condition of identical conditions group is arranged in same a line;Wherein, it is closed with the logic between the independent dimension condition of a line
System for be with, the logical relation between multiple dimension conditions in the same sub- column of described same a line or, described same a line it is same
Multiple dimension conditions in son column are considered as an independent dimension condition;
Different rows is arranged in different condition groups;Wherein, the logical relation for the condition group that do not go together be or.
4. information query method according to claim 1, which is characterized in that the method also includes:
The dimension condition of identical conditions group is arranged in same row;Wherein, the logic between the independent dimension condition of same row is closed
System for be with, the logical relation between multiple dimension conditions in the same sub-line of the same row or, the same row it is same
Multiple dimension conditions in sub-line are considered as an independent dimension condition;
Different column are arranged in different condition groups;Wherein, be arranged the condition group of different lines logical relation be or.
5. a kind of information query device characterized by comprising
Dimension tree definition module, the dimension type of each hierarchy node for pre-defining dimension tree, and define each hierarchy node
Leaf node dimension condition;Wherein, the dimension tree has multiple hierarchy nodes, the corresponding dimension of a hierarchy node
Type, a hierarchy node have multiple leaf nodes, a dimension item under the corresponding affiliated dimension type of a leaf node
Part;
Dimension condition chooses module, at least one condition group, an item is added for choosing dimension condition from the dimension tree
Part group has at least one dimension condition;
If-clause determining module, the logical relation between each dimension condition for determining each condition group, and determine each condition group
Between logical relation be or, obtaining if-clause;
Enquiry module, for inquiring the content being consistent with the if-clause in background data base;
Wherein, the if-clause determining module includes:
Logic determination unit in condition group, for defined logical relation, determination to be each when choosing dimension condition according to user
Logical relation between each dimension condition of condition group;Or, being determined according to user in the corresponding dimension condition of definition leaf node
The logical relation of the dimension condition of justice, determines the logical relation between each dimension condition of each condition group;
Logic determination unit between condition group, for determine the logical relation between each condition group be or,
For the logical relation between each dimension condition that each condition group has been determined, and each condition group is arranged in clause's determination unit
Between logical relation be or after, parsing by each condition group each dimension condition, with each condition group constitute condition tree construction, obtain
To if-clause.
6. information query device according to claim 5, which is characterized in that the dimension condition chooses module and includes:
Unit is pulled, for dimension condition selected in the dimension tree to be dragged to setting regions, the setting regions is drawn
It is divided at least one condition group region, the corresponding condition group in a condition group region;
Condition group determination unit, the corresponding condition group in condition group region for dimension condition to be dragged to, is determined as dimension
The condition group that condition is added.
7. information query device according to claim 5, which is characterized in that described device further include:
First arrangement module, for being arranged the dimension condition of identical conditions group in same a line;Wherein, with the independent dimension of a line
Logical relation between degree condition is with, the logical relation between multiple dimension conditions in the same sub- column of described same a line be or,
Multiple dimension conditions in the same sub- column of described same a line are considered as an independent dimension condition;Different condition groups is arranged
In different rows;Wherein, the logical relation for the condition group that do not go together be or.
8. information query device according to claim 5, which is characterized in that described device further include:
Second arrangement module, for being arranged the dimension condition of identical conditions group in same row;Wherein, the independent dimension of same row
Logical relation between degree condition is with, the logical relation between multiple dimension conditions in the same sub-line of the same row be or,
Multiple dimension conditions in the same sub-line of the same row are considered as an independent dimension condition;Different condition groups is arranged
In different column;Wherein, the logical relation of the condition group of different lines be or.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510765199.1A CN105447098B (en) | 2015-11-10 | 2015-11-10 | A kind of information query method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510765199.1A CN105447098B (en) | 2015-11-10 | 2015-11-10 | A kind of information query method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105447098A CN105447098A (en) | 2016-03-30 |
CN105447098B true CN105447098B (en) | 2018-12-14 |
Family
ID=55557276
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510765199.1A Active CN105447098B (en) | 2015-11-10 | 2015-11-10 | A kind of information query method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105447098B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783495A (en) * | 2019-01-11 | 2019-05-21 | 华青融天(北京)软件股份有限公司 | A kind of multi-dimensional data processing method, device and computer equipment |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729396B (en) * | 2017-09-20 | 2020-01-31 | 上海精数信息科技有限公司 | Data dynamic query method and device |
CN111026469B (en) * | 2018-10-09 | 2023-04-11 | 阿里巴巴集团控股有限公司 | Condition processing method and device and electronic equipment |
CN111198984A (en) * | 2018-11-16 | 2020-05-26 | 阿里巴巴集团控股有限公司 | User group screening method and device and electronic equipment |
CN113254812B (en) * | 2021-06-17 | 2021-09-28 | 浙江口碑网络技术有限公司 | Object set generation method and device |
CN116150436B (en) * | 2023-04-14 | 2023-08-08 | 北京锐服信科技有限公司 | Data display method and system based on node tree |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1858743A (en) * | 2006-03-10 | 2006-11-08 | 华为技术有限公司 | Information searching method and device in relation ship data bank |
CN102682118A (en) * | 2012-05-15 | 2012-09-19 | 北京久其软件股份有限公司 | Multidimensional data model access method and device |
CN104361140A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Dynamically generated data model configuration device and method |
CN104361137A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Device and method for generating data fetching conditions of report form |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102314424B (en) * | 2010-07-01 | 2017-03-01 | 商业对象软件有限公司 | The relation diagram based on dimension of file |
-
2015
- 2015-11-10 CN CN201510765199.1A patent/CN105447098B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1858743A (en) * | 2006-03-10 | 2006-11-08 | 华为技术有限公司 | Information searching method and device in relation ship data bank |
CN102682118A (en) * | 2012-05-15 | 2012-09-19 | 北京久其软件股份有限公司 | Multidimensional data model access method and device |
CN104361140A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Dynamically generated data model configuration device and method |
CN104361137A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Device and method for generating data fetching conditions of report form |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109783495A (en) * | 2019-01-11 | 2019-05-21 | 华青融天(北京)软件股份有限公司 | A kind of multi-dimensional data processing method, device and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105447098A (en) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105447098B (en) | A kind of information query method and device | |
US7827499B2 (en) | Hierarchical dataset dashboard view | |
Huisman et al. | Software for social network analysis | |
US20210150131A1 (en) | Methods and systems for annotating a dashboard | |
US7567250B2 (en) | Visual boundaries for aggregate information in pixel-oriented graphs | |
US8190620B2 (en) | Apparatus and method for visualizing data within a decomposition graph | |
US8314798B2 (en) | Dynamic generation of contextual charts based on personalized visualization preferences | |
CN104813320A (en) | System and method for processing digital traffic metrics | |
Griethe et al. | Visualizing uncertainty for improved decision making | |
CN110580649A (en) | Method and device for determining potential value of commodity | |
CN108122128A (en) | A kind of discount coupon method for release management and device | |
US10936619B2 (en) | Mixed data granularities for multi-dimensional data | |
CN104102670A (en) | Performance indicator analytical framework | |
CN111142749A (en) | Insurance product issuing method, system and terminal equipment | |
US20150120731A1 (en) | Preference based clustering | |
US8768743B2 (en) | Product space browser | |
CN109684387A (en) | Report generation method and device | |
CN103853809A (en) | Efficient space allocation for business objects | |
US20240094887A1 (en) | Intellectual-Property Landscaping Platform with Interactive Graphical Element | |
US20150032685A1 (en) | Visualization and comparison of business intelligence reports | |
Buono et al. | Visualizing association rules in a framework for visual data mining | |
CN104182226A (en) | General mobile information system adaptation method and device | |
US12014436B2 (en) | Intellectual-property landscaping platform | |
US8122056B2 (en) | Interactive aggregation of data on a scatter plot | |
KR20200075630A (en) | Dynamic visualization prototyping system and method for industriy evaluation data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |