Unlock instant, AI-driven research and patent intelligence for your innovation.

Data query method and device

A data query and data source technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve the problems of increased time cost, low efficiency, and complicated data query process, so as to reduce time cost and simplify user experience Operation and the effect of improving convenience

Inactive Publication Date: 2017-05-10
LETV HLDG BEIJING CO LTD +1
View PDF0 Cites 37 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The embodiment of the present invention provides a data query method and device, which are used to solve the problems in the prior art that querying data from different data sources requires different query methods, which leads to complex data query process, low efficiency, and increases the time cost of users. Defects, to simplify the data query process, improve the data query efficiency, and reduce the user's time cost

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data query method and device
  • Data query method and device
  • Data query method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] refer to figure 1 , shows a flow chart of the steps of Embodiment 1 of a data query method of the present invention, which specifically includes:

[0034] Step 101, analyzing the SQL query statement in the data query instruction to obtain the corresponding syntax elements;

[0035] The embodiment of the present invention can be applied to electronic devices, such as computers, servers, etc., to determine the corresponding data query operation according to the data source type carried in the SQL query statement in the received query command. In this way, the user can grasp the SQL The query method of the database is enough, without having to master the data query method of other types of data sources, which reduces the user's time cost, and when the queried data is switched between different types of data sources, the query method can be automatically converted to The query operation of the corresponding type of data source does not require the conversion of the query o...

Embodiment 2

[0044] refer to figure 2 , which shows a flow chart of steps in Embodiment 2 of a data query method according to an embodiment of the present invention, which may specifically include:

[0045] Step 201, analyzing the SQL query statement in the data query instruction to obtain the corresponding syntax elements;

[0046] Step 202, according to the grammatical element, determine each data source to be queried and the type of each data source; Wherein, the determined data source to be queried is only the Elasticsearch search engine data source;

[0047] Step 203, converting the SQL query statement into a query statement supported by the Elasticsearch search engine data source;

[0048] Step 204, use the query statement supported by the Elasticsearch search engine data source to query the Elasticsearch search engine data source.

[0049] With respect to the method embodiment one, the data source to be queried determined in the embodiment of the present invention is only the Ela...

example 1

[0054] The received SQL query statement is as follows:

[0055] select ip,logtimefrom indexName where ip='127.0.0.1';

[0056] The syntax elements obtained after parsing the above SQL query statement may specifically include: select field: ip, logtime; from field: indexName; where field: ip='127.0.0.1'.

[0057] Convert the above SQL query statement into a query statement supported by the Elasticsearch search engine data source:

[0058] 1. Process the select field: convert the select field into the acquisition field of the source object content of each document of the Elasticsearch search engine data source:

[0059]

[0060] 2. Process the from field: convert the from field into the index field corresponding to the Elasticsearch search engine data source:

[0061] indexName / _search

[0062] 3. Process the where field: convert the where field into the query filter field corresponding to the Elasticsearch search engine data source, and can correspond to the query compone...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a data query method and a data query device. The method comprises the steps of analyzing an SQL query statement in a data query command, thus acquiring corresponding syntactic elements; determining each data source to be queried and the type of each data source according to the syntactic elements; and adopting a self-defined data query strategy corresponding to the type of each data source to execute a corresponding data query operation on each data source according to the determined type of each data source. According to the method and the device provided by the embodiment of the invention, user operation can be simplified, query efficiency can be improved, and time costs of the user can be reduced.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of data storage, and in particular, to a method and device for data query. Background technique [0002] With the rapid development of the Internet, various information technology systems and network devices will generate a large amount of data, which will be stored in the corresponding database for subsequent query and analysis, so the data collection and query system has a wide range of uses. [0003] However, during the process of implementing the present application, the inventors found that there are at least the following problems in the related art: [0004] Different data source types correspond to different data query methods. For example, the Elasticsearch search engine is a near-real-time search engine that provides distributed storage capabilities, so the Elasticsearch search engine can be regarded as a nosql (non-relational database, Not Only SQL) database use. The El...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/2448G06F16/2453
Inventor 夏国兵祝海林
Owner LETV HLDG BEIJING CO LTD