Method for analyzing logic expression into general query statement
A logical expression and general query technology, applied in the field of parsing logical expressions into general query statements, can solve problems such as single business scenarios, inability to adapt to multiple data sources, and inability to dynamically configure data sources, etc., to achieve enhanced expansion flexibility, enrich business scenarios, and reduce the effect of development
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0036] Take the logical expression of pure number type: 3+(3-0)*2 as an example, the logical expression is divided into three parts, variables (3, 0, 2), operators (+, -, *), separators characters (brackets ()).
[0037] Generate a parseable list of logical expressions:
[0038] 1. Declare logical expression: 3+(3-0)*2;
[0039] 2. Traverse the declared logical expression and generate the basic list in the queue structure storage unit: ("3", "+", "(", "3", "-", "0", ")", "* ","2");
[0040] 3. Declare a list structure storage unit (list) and a stack structure storage unit (stack);
[0041] 4. Traverse the basic list of the list, put the variable into the list, and push the operator into the stack;
[0042] 5. When the variable "3" is encountered, put it into list('3');
[0043] 6. When operator "+" is encountered, push into stack('+');
[0044] 7. When the delimiter "(" is encountered, press stack('+', '(');
[0045] 8. When the variable "3" is encountered, put it into ...
Embodiment 2
[0061] Taking Hbase (a distributed, column-oriented open source database) and Solr (a full-text search engine developed in Java) as examples, two different data interfaces between Hbase and Solr need to be connected. Among them, Solr is used as the data source.
[0062] The business modules are shown in Table 1:
[0063] Table 1:
[0064] module name data source Table Name Business 1 query module Hbase hbase_1 Business 2 query module Solr solr_1
[0065] The business field mapping is shown in Table 2:
[0066] Table 2:
[0067] module name query field name The real field name in the table field data type Business 2 query module a solr_col_1 string Business 2 query module b solr_col_2 int Business 2 query module c solr_col_3 string
[0068] The mapping table of configuration operators is shown in Table 3:
[0069] table 3:
[0070] module name data source query operator d...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com