CN107832391A - A kind of data query method and system - Google Patents
A kind of data query method and system Download PDFInfo
- Publication number
- CN107832391A CN107832391A CN201711047703.XA CN201711047703A CN107832391A CN 107832391 A CN107832391 A CN 107832391A CN 201711047703 A CN201711047703 A CN 201711047703A CN 107832391 A CN107832391 A CN 107832391A
- Authority
- CN
- China
- Prior art keywords
- sdl
- data
- syntax tree
- abstract syntax
- instructions
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000000694 effects Effects 0.000 abstract description 15
- 238000005516 engineering process Methods 0.000 abstract description 10
- 230000006870 function Effects 0.000 description 11
- 230000006399 behavior Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000032258 transport Effects 0.000 description 1
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
-
- 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/2455—Query execution
- G06F16/24553—Query execution of query operations
-
- 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/25—Integrating or interfacing systems involving database management systems
- G06F16/254—Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present embodiments relate to a kind of data query method and system, belong to big data technical field.This method includes:SDL resolvers in SDL engines parse to the SDL instructions received, obtain abstract syntax tree;SDL interpreters in SDL engines parse to abstract syntax tree;After SDL engines are connected by SDL interfaces with data warehouse, SDL interpreters are called by Http agreements to data message corresponding with the abstract syntax tree after parsing in data warehouse;The operation according to corresponding to the abstract syntax tree after data message and parsing performs SDL instructions of SDL interpreters.The technical scheme provided by the present embodiment, on the one hand, avoid consuming cost height in the prior art, applicability is single, and Query Result is not accurate enough, and easily causes the technology drawback of interference;On the other hand, realize and flexibly data are inquired about, and accuracy is high, the high technique effect of search efficiency.
Description
Technical field
The present embodiments relate to big data technical field, more particularly to a kind of data query method and system.
Background technology
With the development of big data correlation technique, increasing people, which notices, hides huge economic valency under big data
Value.It is also required to understand IT technologies if wanting to be engaged in big data analysis work and not only needing to be grasped professional knowledge, the height to analyzing personnel
It is required that it is set to hang back.
In the prior art, when needing to inquire about statistics, there are two kinds of implementations.
First way is:By specific system, statistics is inquired about.
Second of implementation be:Statistics is inquired about by field (or critical field).
However, inventor during the present invention is realized, at least there is problems with discovery:
If the 1, being inquired about by way of development system, cost is added, and specific some data can only be directed to
Inquired about, diversity can not be realized;
If the 2, being inquired about by way of field, process is cumbersome, and easily by the information screen of needs.
The content of the invention
In order to solve the above technical problems, the embodiments of the invention provide a kind of data query method and system.
It is according to embodiments of the present invention in a first aspect, the embodiments of the invention provide a kind of data query method, the side
Method includes:
SDL resolvers in SDL engines parse to the SDL instructions received, obtain abstract syntax tree;
SDL interpreters in the SDL engines parse to the abstract syntax tree;
After the SDL engines are connected by SDL interfaces with data warehouse, the SDL interpreters pass through Http agreements pair
Data message corresponding with the abstract syntax tree after parsing is called in the data warehouse;
SDL interpreters behaviour according to corresponding to the abstract syntax tree after the data message and parsing performs SDL instructions
Make.
There is provided by the present embodiment:SDL resolvers are parsed to SDL instructions, obtain abstract syntax tree, and SDL is explained
Device parses to the abstract syntax tree, and is entered by Http agreements pair data message corresponding with the abstract syntax tree after parsing
Row call, so as to according to data message and parsing after abstract syntax tree perform SDL instruction corresponding to operation technical scheme, one
Aspect, avoid when being inquired about in the prior art by specific system data, consuming cost is high, the single skill of applicability
Art drawback;On the other hand, avoid when being inquired about in the prior art by " field " or " critical field " data, inquiry knot
Fruit is not accurate enough, and easily causes the technology drawback of interference;Another further aspect, realize and flexibly data are inquired about, and it is accurate
True property is high, the high technique effect of search efficiency.
Further, the SDL resolvers in the SDL engines parse to the SDL instructions received, obtain abstract language
Method tree, specifically includes:
The SDL instructions are parsed, obtain constant, operator, variable, the name object in the SDL instructions;
The priority of operator according to SDL instructions, the constant, the fortune during the SDL is instructed
Operator, the variable, the name object are converted into the abstract syntax tree.
There is provided by the present embodiment:According to the priority of operator, constant, operator, variable and name object are obtained
To the technical scheme of abstract syntax tree, the accurate and quick technique effect for generating abstract syntax tree is realized, so as to further
Realize and flexibly data are inquired about, and accuracy is high, the high technique effect of search efficiency.
Further, the SDL interpreters perform SDL instructions according to the abstract syntax tree after the data message and parsing
Corresponding operation, is specifically included:
According to the node of the abstract syntax tree after the traversal rule traversal parsing pre-set, to obtain calculating logic;
The operation according to corresponding to the calculating logic and the data message called perform the SDL instructions, and obtain
Implementing result.
There is provided by the present embodiment:Calculating logic is obtained according to traverse node, so as to according to the calculating logic and data
Information performs the technical scheme of operation corresponding to SDL instructions, realizes precisely and quickly performs the skill of operation corresponding to SDL instructions
Art effect, flexibly data are inquired about so as to furthermore achieved that, and accuracy is high, the high technique effect of search efficiency.
Further, the traversal rule that pre-sets is:Breadth First rule or depth-first rule.
Further, methods described also includes:
Processor is carried out according to the predefined rule pre-set to the syntactic structure of query statement in the data warehouse
Definition;
When SDL instructions and the syntactic structure of the query statement match, and the SDL is drawn in SDL interfaces
Hold up after being connected with data warehouse, then the SDL interpreters by Http agreements in the data warehouse with taking out after parsing
Data message is called as corresponding to syntax tree.
There is provided by the present embodiment:The syntactic structure of query statement is defined, only referred to when SDL instructs with inquiry
When the syntactic structure of order matches, and after SDL engines are connected with data warehouse, SDL interpreters could be in data warehouse
The technical scheme that data message is called, it is ensured that the safety and reliability of called data information, so as to further realize
Flexibly data are inquired about, and accuracy is high, search efficiency high technique effect.
Other side according to embodiments of the present invention, the embodiments of the invention provide corresponding with above-described embodiment a kind of
Data query system, the system include:SDL engines, SDL interfaces and data warehouse, wherein, the SDL engines solve including SDL
Parser and SDL interpreters, wherein,
The SDL resolvers are used for:The SDL instructions received are parsed, obtain abstract syntax tree;
The SDL interpreters are used for:The abstract syntax tree is parsed, and drawn the SDL in the SDL interfaces
Hold up after being connected with the data warehouse, by Http agreements to corresponding with the abstract syntax tree after parsing in the data warehouse
Data message be called, and it is corresponding according to the data message with the abstract syntax tree after parsing to perform the SDL instructions
Operation.
Further, the SDL resolvers are specifically used for:
The SDL instructions are parsed, obtain constant, operator, variable, the name object in the SDL instructions;
The priority of operator according to SDL instructions, the constant, the fortune during the SDL is instructed
Operator, the variable, the name object are converted into the abstract syntax tree.
Further, the SDL interpreters are specifically used for:
The node of the abstract syntax tree is traveled through according to the traversal rule pre-set, to obtain calculating logic;
The operation according to corresponding to the calculating logic and the data message called perform the SDL instructions, and obtain
Implementing result.
Further, the traversal rule that pre-sets is:Breadth First rule or depth-first rule.
Further, the system also includes:Processor, wherein,
The processor is used for:Grammer according to the predefined rule pre-set to query statement in the data warehouse
Structure is defined;
When SDL instructions and the syntactic structure of the query statement match, and in the SDL interfaces by described in
After SDL engines are connected with data warehouse, then the SDL interpreters by Http agreements in the data warehouse with after parsing
Abstract syntax tree corresponding to data message be called.
The beneficial effect of the embodiment of the present invention is, SDL instructions are parsed as a result of SDL resolvers, obtained
Abstract syntax tree, SDL interpreters parse to the abstract syntax tree, and pass through Http agreements pair and the abstract syntax after parsing
Data message is called corresponding to tree, corresponding so as to perform SDL instructions with the abstract syntax tree after parsing according to data message
Operation technical scheme, on the one hand, avoid when being inquired about in the prior art by specific system data, consume into
This height, the single technology drawback of applicability;On the other hand, avoid in the prior art by " field " or " critical field " logarithm
During according to being inquired about, Query Result is not accurate enough, and easily causes the technology drawback of interference;Another further aspect, realize flexible
Data are inquired about, and accuracy is high, the high technique effect of search efficiency.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of data query method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of data query system provided in an embodiment of the present invention;
Fig. 3 is the reference view that abstract syntax tree is generated in a kind of data query method provided in an embodiment of the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as particular system structure, interface, technology it
The detail of class, understand the present invention to cut thoroughly.However, it will be clear to one skilled in the art that there is no these specific
The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, circuit and
The detailed description of method, in case unnecessary details hinders description of the invention.
The embodiments of the invention provide a kind of data query method and system.
One side according to embodiments of the present invention, the embodiments of the invention provide a kind of data query method.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow sheet of data query method provided in an embodiment of the present invention.
As shown in figure 1, this method includes:
Step S100:SDL resolvers in SDL engines parse to the SDL instructions received, obtain abstract syntax
Tree;
Step S200:SDL interpreters in SDL engines parse to abstract syntax tree;
Step S300:After SDL engines are connected by SDL interfaces with data warehouse, SDL interpreters pass through Http agreements pair
Data message corresponding with the abstract syntax tree after parsing is called in data warehouse;
Step S400:SDL interpreters behaviour according to corresponding to the abstract syntax tree after data message and parsing performs SDL instructions
Make.
It is understood that it is two deck structures that SDL, which is divided to, specially syntactic definition layer and language realizes layer.Wherein,
Belong to language with SDL interfaces in SDL engines and realize layer, and data warehouse belongs to syntactic definition layer.And SDL engines solve including SDL
Parser and SDL interpreters.
Such as:User needs to inquire about certain data A, then sending SDL corresponding to data A to SDL engines instructs B.SDL
Resolver to receive SDL instruction B parse after, obtain abstract syntax tree C.SDL interpreters solve to abstract syntax tree
Analysis, and only in the case where SDL engines are connected with data warehouse, SDL interpreters could be by Http agreements to data message
It is called.
Wherein, the step of SDL engines are connected with data warehouse is before step S300.And SDL interfaces are to access number
According to the passage in warehouse, SDL externally provides the access of the Http protocol formats of standard, as long as can support that the computer of Http agreements is equal
The inquiry operation in the complete paired data warehouses of SDL can be passed through.
Wherein, SDL interfaces are specially SDL API.
It is combined, performs in abstract syntax tree of the data message D after parsing corresponding to SDL instructs A according to calling
Operated corresponding to SDL instructions A, to realize the inquiry of data.
There is provided by the present embodiment:SDL resolvers are parsed to SDL instructions, obtain abstract syntax tree, and SDL is explained
Device parses to the abstract syntax tree, and is entered by Http agreements pair data message corresponding with the abstract syntax tree after parsing
Row call, so as to according to data message and parsing after abstract syntax tree perform SDL instruction corresponding to operation technical scheme, one
Aspect, avoid when being inquired about in the prior art by specific system data, consuming cost is high, the single skill of applicability
Art drawback;On the other hand, avoid when being inquired about in the prior art by " field " or " critical field " data, inquiry knot
Fruit is not accurate enough, and easily causes the technology drawback of interference;Another further aspect, realize and flexibly data are inquired about, and it is accurate
True property is high, the high technique effect of search efficiency.
In another embodiment, step S100 is specifically included:
SDL instructions are parsed, obtain constant, operator, variable, the name object in SDL instructions;
The priority of operator in being instructed according to SDL, constant, operator, variable, name object during SDL is instructed turn
Turn to abstract syntax tree.
In the present embodiment, abstract syntax tree how is obtained to SDL resolvers to be set forth.
More specifically, in being instructed according to SDL operator priority, generate abstract syntax tree from the bottom up successively.
Such as:After SDL resolvers receive SDL instructions, SDL instructions are parsed, the constant in SDL instructions is obtained, transports
Operator, variable and name object.
Such as:SDL is instructed:A1+a*b, after being parsed to SDL instructions, obtain abstract syntax as shown in Figure 3
Tree.
There is provided by the present embodiment:According to the priority of operator, constant, operator, variable and name object are obtained
To the technical scheme of abstract syntax tree, the accurate and quick technique effect for generating abstract syntax tree is realized, so as to further
Realize and flexibly data are inquired about, and accuracy is high, the high technique effect of search efficiency.
In another embodiment, in step S300, SDL interpreters are according to the abstract syntax tree after data message and parsing
Perform and operated corresponding to SDL instructions, specifically included:
According to the node of the abstract syntax tree after the traversal rule traversal parsing pre-set, to obtain calculating logic;
The operation according to corresponding to the calculating logic and the data message called perform the SDL instructions, and obtain
Implementing result.
Elaborated in conjunction with Fig. 3, from bottom to up the abstract syntax tree in traversing graph 3 successively, obtain calculating logic:First
A and b product is calculated, the product is being added with A1.
Data message corresponding with a, b, A1 and above-mentioned calculating logic will be transferred from data warehouse again, SDL is performed and refers to
Operated corresponding to order, obtain implementing result.
If it is that data message corresponding to 6, b is also 5 that data message corresponding to A1, which is data message corresponding to 5, a, then
The result arrived is 35.
There is provided by the present embodiment:Calculating logic is obtained according to traverse node, so as to according to the calculating logic and data
Information performs the technical scheme of operation corresponding to SDL instructions, realizes precisely and quickly performs the skill of operation corresponding to SDL instructions
Art effect, flexibly data are inquired about so as to furthermore achieved that, and accuracy is high, the high technique effect of search efficiency.
In another embodiment, the traversal rule pre-set is:Breadth First rule or depth-first rule.
More specifically, depth-first rule is to be traveled through from the orlop node of abstract syntax tree toward the superiors' node.
In another embodiment, this method also includes:
Processor is defined according to the predefined rule pre-set to the syntactic structure of query statement in data warehouse;
When SDL instructions match with the syntactic structure of query statement, and in SDL interfaces by SDL engines and data warehouse
After connection, then SDL interpreters are believed data corresponding with the abstract syntax tree after parsing in data warehouse by Http agreements
Breath is called.
More specifically, processor is also defined to contents such as the function of query statement, function list and matched rules.Screen
The technical logic of complexity has been covered, has but remained abundant business operation ability.
That is, syntactic definition layer realizes the connection and disconnection with data warehouse, and realizes to metadata query, to data
Inquiry, to data statistics, data are charted, and kit etc. is operated.
Wherein, the data type that SDL engines are supported includes:1st, it is digital, specifically include:Integer, floating number;2nd, system is normal
Amount, is specifically included:null、true、false;3rd, character string, it is mark with " ", such as:"This is a string";4th, order
Name parameter, such as:abc;5th, function, such as:Add () etc.;6th, operator, including:()[]!+-*/etc..
Wherein, matched rule includes:Fuzzy matching rule, commensurate in scope rule, coordination matched rule.
Specifically, can pass through:" % " represents fuzzy matching;"~", represents commensurate in scope;", " represents coordination;“!" table
Show the relation in addition to specifying.
It should be noted that it can be applied in combination between matched rule.
Wherein, connecting the handling function of data warehouse can be:sdl.connect(username,password);Data are looked into
The handling function of inquiry can be:sdl.data();The handling function of metadata query can be:Sdl.variable (), data calculate
Handling function can be:Sdl.data.min (), the handling function of map data can be:Sdl.boxplot (), tool set
Handling function can be:sdl.tools.sort().
There is provided by the present embodiment:The syntactic structure of query statement is defined, only referred to when SDL instructs with inquiry
When the syntactic structure of order matches, and after SDL engines are connected with data warehouse, SDL interpreters could be in data warehouse
The technical scheme that data message is called, it is ensured that the safety and reliability of called data information, so as to further realize
Flexibly data are inquired about, and accuracy is high, search efficiency high technique effect.
To make the technical scheme of the embodiment of the present invention clearer, illustrated especially exemplified by example.
For example, it is desired to " total profit of industrial enterprise of the inquiry operating income more than 1,000,000 ", the request is converted into
SDL is instructed:Variable=" total profit ", operating income=" 1000000~", specialty=" industry ".
It is as follows that step is performed in detail:
SDL resolvers parse to SDL instructions, obtain abstract syntax tree, SDL interpreters enter to the abstract syntax tree
Row parsing, passes through:Sdl.connect (" username ", " password ") connection data warehouses, are called to data message
And perform and operated corresponding to SDL instructions, it is specific as follows:
Query metadata:1st, sdl.variable (" total profit, operating income, professional ")
// the coding for finding these three variables from returning result is respectively VAR100002, VAR100151,
VAR101059;
2nd, sdl.code (" industry ")
// the operation code returned is B
Inquire about data:
Sdl.data (variables=" VAR100002 ", VAR100151=" 1000000~", VAR101059="
B")
After the data message that needs are inquired about is obtained, it can pass through:Sdl.disconnect () turns off to data warehouse.
Other side according to embodiments of the present invention, the embodiments of the invention provide one kind corresponding with the above method
Data query system.
Referring to Fig. 2, Fig. 2 is a kind of structural representation of data query system provided in an embodiment of the present invention.
As shown in Fig. 2 the system includes:SDL engines, SDL interfaces and data warehouse, wherein, SDL engines solve including SDL
Parser and SDL interpreters, wherein,
SDL resolvers are used for:The SDL instructions received are parsed, obtain abstract syntax tree;
SDL interpreters are used for:Abstract syntax tree is parsed, and is connected SDL engines with data warehouse in SDL interfaces
Afterwards, data message corresponding with the abstract syntax tree after parsing in data warehouse is called by Http agreements, and root
Perform according to the abstract syntax tree after data message and parsing and operated corresponding to SDL instructions.
More specifically, SDL resolvers are specifically used for:
SDL instructions are parsed, obtain constant, operator, variable, the name object in SDL instructions;
The priority of operator in being instructed according to SDL, constant, operator, variable, name object during SDL is instructed turn
Turn to abstract syntax tree.
More specifically, SDL interpreters are specifically used for:
According to the node of the traversal rule ergodic abstract syntax tree pre-set, to obtain calculating logic;
The operation according to corresponding to calculating logic and the data message called perform SDL instructions, and obtain implementing result.
More specifically, the traversal rule pre-set is:Breadth First rule or depth-first rule.
More specifically, system also includes:Processor, wherein,
Processor is used for:The syntactic structure of query statement in data warehouse is carried out according to the predefined rule pre-set
Definition;
When SDL instructions match with the syntactic structure of query statement, and in SDL interfaces by SDL engines and data warehouse
After connection, then SDL interpreters are believed data corresponding with the abstract syntax tree after parsing in data warehouse by Http agreements
Breath is called.
The embodiment of the present invention is parsed by SDL resolvers to SDL instructions, obtains abstract syntax tree, SDL interpreters pair
The abstract syntax tree is parsed, and is adjusted by Http agreements pair data message corresponding with the abstract syntax tree after parsing
With so as to the technical scheme operated according to corresponding to the abstract syntax tree execution SDL instructions after data message and parsing, a side
Face, avoid when being inquired about in the prior art by specific system data, consuming cost is high, the single technology of applicability
Drawback;On the other hand, avoid when being inquired about in the prior art by " field " or " critical field " data, Query Result
Not enough precisely, and the technology drawback of interference is easily caused;Another further aspect, realize and flexibly data are inquired about, and accurately
Property high, the high technique effect of search efficiency.
Reader should be understood that in the description of this specification, reference term " one embodiment ", " some embodiments ", " show
The description of example ", " specific example " or " some examples " etc. mean to combine the specific features of the embodiment or example description, structure,
Material or feature are contained at least one embodiment or example of the present invention.In this manual, above-mentioned term is shown
The statement of meaning property need not be directed to identical embodiment or example.Moreover, specific features, structure, material or the feature of description
It can be combined in an appropriate manner in any one or more embodiments or example.In addition, in the case of not conflicting, this
The technical staff in field can be by the different embodiments or example described in this specification and the spy of different embodiments or example
Sign is combined and combined.
It is apparent to those skilled in the art that for convenience of description and succinctly, the dress of foregoing description
The specific work process with unit is put, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it can be passed through
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of unit, is only
A kind of division of logic function, can there is an other dividing mode when actually realizing, for example, multiple units or component can combine or
Person is desirably integrated into another system, or some features can be ignored, or does not perform.
The unit illustrated as separating component can be or may not be physically separate, be shown as unit
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be selected to realize the mesh of scheme of the embodiment of the present invention according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
It is that unit is individually physically present or two or more units are integrated in a unit.It is above-mentioned integrated
Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can
To be stored in a computer read/write memory medium.Based on such understanding, technical scheme substantially or
Say that the part to be contributed to prior art, or all or part of the technical scheme can be embodied in the form of software product
Out, the computer software product is stored in a storage medium, including some instructions are causing a computer equipment
(can be personal computer, server, or network equipment etc.) performs all or part of each embodiment method of the present invention
Step.And foregoing storage medium includes:It is USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random
Access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with Jie of store program codes
Matter.
It should also be understood that in various embodiments of the present invention, the size of the sequence number of above-mentioned each process is not meant to execution sequence
Priority, the execution sequence of each process should determine with its function and internal logic, the implementation without tackling the embodiment of the present invention
Journey forms any restriction.
More than, it is only embodiment of the invention, but protection scope of the present invention is not limited thereto, and it is any to be familiar with
Those skilled in the art the invention discloses technical scope in, various equivalent modifications or substitutions can be readily occurred in,
These modifications or substitutions should be all included within the scope of the present invention.Therefore, protection scope of the present invention should be wanted with right
The protection domain asked is defined.
Claims (10)
- A kind of 1. data query method, it is characterised in that methods described includes:SDL resolvers in SDL engines parse to the SDL instructions received, obtain abstract syntax tree;SDL interpreters in the SDL engines parse to the abstract syntax tree;After the SDL engines are connected by SDL interfaces with data warehouse, the SDL interpreters are by Http agreements to described Data message corresponding with the abstract syntax tree after parsing is called in data warehouse;SDL interpreters behaviour according to corresponding to the abstract syntax tree after the data message and parsing performs the SDL instructions Make.
- A kind of 2. data query method according to claim 1, it is characterised in that the SDL resolvers in the SDL engines The SDL instructions received are parsed, abstract syntax tree is obtained, specifically includes:The SDL instructions are parsed, obtain constant, operator, variable, the name object in the SDL instructions;According to the SDL instruction described in operator priority, by the SDL instruct in the constant, the operator, The variable, the name object are converted into the abstract syntax tree.
- 3. a kind of data query method according to claim 1, it is characterised in that the SDL interpreters are according to the number Operate, specifically include corresponding to SDL instructions it is believed that the abstract syntax tree after breath and parsing performs:According to the node of the abstract syntax tree after the traversal rule traversal parsing pre-set, to obtain calculating logic;The operation according to corresponding to the calculating logic and the data message called perform the SDL instructions, and performed As a result.
- A kind of 4. data query method according to claim 3, it is characterised in that the traversal rule pre-set For:Breadth First rule or depth-first rule.
- 5. a kind of data query method according to any one of claim 1-4, it is characterised in that methods described is also wrapped Include:Processor is defined according to the predefined rule pre-set to the syntactic structure of query statement in the data warehouse;When SDL instructions match with the syntactic structure of the query statement, and SDL interfaces by the SDL engines with Data warehouse connection after, then the SDL interpreters by Http agreements in the data warehouse with the abstract language after parsing Data message corresponding to method tree is called.
- 6. a kind of data query system, it is characterised in that the system includes:SDL engines, SDL interfaces and data warehouse, its In, the SDL engines include SDL resolvers and SDL interpreters, wherein,The SDL resolvers are used for:The SDL instructions received are parsed, obtain abstract syntax tree;The SDL interpreters are used for:The abstract syntax tree is parsed, and the SDL interfaces by the SDL engines with After the data warehouse connection, by Http agreements to number corresponding with the abstract syntax tree after parsing in the data warehouse It is believed that breath is called, and the behaviour according to corresponding to the abstract syntax tree after the data message and parsing performs the SDL instructions Make.
- 7. a kind of data query system according to claim 6, it is characterised in that the SDL resolvers are specifically used for:The SDL instructions are parsed, obtain constant, operator, variable, the name object in the SDL instructions;According to the SDL instruction described in operator priority, by the SDL instruct in the constant, the operator, The variable, the name object are converted into the abstract syntax tree.
- 8. a kind of data query system according to claim 7, it is characterised in that the SDL interpreters are specifically used for:The node of the abstract syntax tree is traveled through according to the traversal rule pre-set, to obtain calculating logic;The operation according to corresponding to the calculating logic and the data message called perform the SDL instructions, and performed As a result.
- A kind of 9. data query system according to claim 8, it is characterised in that the traversal rule pre-set For:Breadth First rule or depth-first rule.
- 10. a kind of data query system according to any one of claim 6-9, it is characterised in that the system is also wrapped Include:Processor, wherein,The processor is used for:Syntactic structure according to the predefined rule pre-set to query statement in the data warehouse It is defined;When SDL instructions and the syntactic structure of the query statement match, and the SDL is drawn in the SDL interfaces Hold up after being connected with data warehouse, then the SDL interpreters by Http agreements in the data warehouse with taking out after parsing Data message is called as corresponding to syntax tree.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711047703.XA CN107832391B (en) | 2017-10-31 | 2017-10-31 | Data query method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711047703.XA CN107832391B (en) | 2017-10-31 | 2017-10-31 | Data query method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107832391A true CN107832391A (en) | 2018-03-23 |
CN107832391B CN107832391B (en) | 2020-08-18 |
Family
ID=61651165
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711047703.XA Active CN107832391B (en) | 2017-10-31 | 2017-10-31 | Data query method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107832391B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108806797A (en) * | 2018-06-27 | 2018-11-13 | 思派(北京)网络科技有限公司 | A kind of processing method and system of medical data |
CN108920614A (en) * | 2018-06-28 | 2018-11-30 | 北京奇虎科技有限公司 | The method, apparatus and system of online query data |
CN109542954A (en) * | 2018-11-30 | 2019-03-29 | 长城计算机软件与***有限公司 | A kind of data query method and system of unified interface |
CN112579856A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method and device for processing crawling control instruction |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252509A (en) * | 2013-11-05 | 2014-12-31 | 深圳市华傲数据技术有限公司 | Expression execution method and expression execution device |
CN104899314A (en) * | 2015-06-17 | 2015-09-09 | 北京京东尚科信息技术有限公司 | Pedigree analysis method and device of data warehouse |
CN105930267A (en) * | 2016-04-15 | 2016-09-07 | 中国工商银行股份有限公司 | Database dictionary based storage process static detection method and system |
US20170046250A1 (en) * | 2015-06-10 | 2017-02-16 | International Business Machines Corporation | Source code search engine |
CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
-
2017
- 2017-10-31 CN CN201711047703.XA patent/CN107832391B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252509A (en) * | 2013-11-05 | 2014-12-31 | 深圳市华傲数据技术有限公司 | Expression execution method and expression execution device |
US20170046250A1 (en) * | 2015-06-10 | 2017-02-16 | International Business Machines Corporation | Source code search engine |
CN104899314A (en) * | 2015-06-17 | 2015-09-09 | 北京京东尚科信息技术有限公司 | Pedigree analysis method and device of data warehouse |
CN105930267A (en) * | 2016-04-15 | 2016-09-07 | 中国工商银行股份有限公司 | Database dictionary based storage process static detection method and system |
CN107038207A (en) * | 2017-02-20 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of data query method, data processing method and device |
Non-Patent Citations (1)
Title |
---|
何炎祥: "《编译程序构造》", 30 April 1988 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108806797A (en) * | 2018-06-27 | 2018-11-13 | 思派(北京)网络科技有限公司 | A kind of processing method and system of medical data |
CN108920614A (en) * | 2018-06-28 | 2018-11-30 | 北京奇虎科技有限公司 | The method, apparatus and system of online query data |
CN108920614B (en) * | 2018-06-28 | 2021-08-20 | 北京奇虎科技有限公司 | Method, device and system for inquiring data online |
CN109542954A (en) * | 2018-11-30 | 2019-03-29 | 长城计算机软件与***有限公司 | A kind of data query method and system of unified interface |
CN112579856A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method and device for processing crawling control instruction |
Also Published As
Publication number | Publication date |
---|---|
CN107832391B (en) | 2020-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7398537B2 (en) | Obfuscation of user content in structured user data files | |
CN107832391A (en) | A kind of data query method and system | |
US10237295B2 (en) | Automated event ID field analysis on heterogeneous logs | |
US9483583B2 (en) | Syslog parser | |
CN109862379A (en) | A kind of log processing method, device, mobile terminal and storage medium | |
CN108804323A (en) | Code quality monitoring method, equipment and storage medium | |
CN110175027A (en) | A kind of method and apparatus for developing business function | |
CN106341257B (en) | Device for self-defining log analysis rule and automatically analyzing log | |
CN102647414A (en) | Protocol analysis method, protocol analysis device and protocol analysis system | |
CN110661660B (en) | Alarm information root analysis method and device | |
US20190220452A1 (en) | Index suggestion engine for relational databases | |
US10324933B2 (en) | Technique for processing query in database management system | |
KR101461051B1 (en) | Method for detecting malignant code through web function analysis, and recording medium thereof | |
CN112068815B (en) | Method and device for processing business rules | |
CN107426211A (en) | Detection method and device, terminal device and the computer-readable storage medium of network attack | |
CN111708756A (en) | Method, device and equipment for automatically processing data warehouse and storage medium | |
CN110532267A (en) | Determination method, apparatus, storage medium and the electronic device of field | |
CN116010389A (en) | Data verification method, device, equipment and storage medium | |
CN111079407B (en) | Method and device for analyzing content input by user | |
CN112131239B (en) | Data processing method, computer equipment and readable storage medium | |
US20220342919A1 (en) | Method and system for generating a response to an unstructured natural language (nl) query | |
CN105930453A (en) | Repeatability analyzing method and device | |
CN105204937B (en) | Kernel function call method, apparatus and operating system | |
CN110045961B (en) | Management method and management platform of business rules | |
CN106959903A (en) | Trap instruction Trap processing method and processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100190 17-19 / F, building a 1, 66 Zhongguancun East Road, Haidian District, Beijing Patentee after: New Great Wall Technology Co.,Ltd. Address before: 100190 17-19 / F, building a 1, 66 Zhongguancun East Road, Haidian District, Beijing Patentee before: GREAT WALL COMPUTER SOFTWARE & SYSTEMS Inc. |
|
CP01 | Change in the name or title of a patent holder |