Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

API-based query system and method

A query method and query system technology, applied in database management systems, structured data retrieval, instruments, etc., can solve the problems of inconvenient unified maintenance, scattered queries, and inability to update in time, so as to reduce interface testing time, speed up development, Find easy-to-use effects

Pending Publication Date: 2021-03-09
上海好屋网信息技术有限公司
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] 1. Code development needs to be carried out through programming languages, and related queries are scattered among various modules, which is not convenient for unified maintenance, and will be released and launched frequently;
[0007] 2. When there is a problem, it cannot be updated in time, and the request parameters of the interface, the returned result, or the processing logic change cannot be updated in time;
[0008] 3. It is impossible to dynamically add new query services;
[0009] 4. When the same query interface has a small part of the new business requirements, it cannot be compatible. It is necessary to re-modify the original interface or add a new interface
[0010] In actual work, a department is responsible for the query of elasticsearch. APIs are provided according to business needs. It is not obvious to use the above methods in a timely manner for business needs. However, when dealing with the needs of multiple business development lines, the above two The problem is particularly difficult to solve, taking up a lot of manpower and time

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
  • API-based query system and method
  • API-based query system and method
  • API-based query system and method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0070] Reference manual attached figure 1 As shown, the API-based query method of this application is shown, and the method may include the following steps:

[0071] S1. Access the query statement input by the user in the form of a database interface through the receiving module, and send the query statement input by the user to the control module;

[0072] S2. Analyze the query statement input by the user through the control module, compile and customize the corresponding execution plan, including the compilation process and the execution process;

[0073] S3. Receive the query statement input by the user through the compilation process, analyze the JS logic code and query statement, and generate the final ES query statement and java logic processing code after compilation;

[0074] S4. Through the execution process, call the executor to obtain the returned results according to the final ES query statement, and filter or aggregate the results according to the configuration, ...

Embodiment 2

[0122] Embodiment 2, with reference to specification sheet Figure 4 , which shows a query system provided by an embodiment of the present application for executing any of the above API-based query methods, including:

[0123] The receiving module 1 is used to receive the query statement input by the user;

[0124] The control module 2 is used to analyze the query statement input by the user, compile and customize the corresponding execution plan, wherein the control module includes a compilation unit and an execution unit,

[0125] The compiling unit 3 is used for parsing the input query statement and generating the final ES query statement after compiling;

[0126] The execution unit 4 is used to call the executor to obtain the returned result, process the returned result according to the configuration, and the returned result is in the data format required by the user.

[0127] In an optional embodiment, a query statement described in SQL input by a user through a client ...

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 invention discloses an API-based query method, and the method comprises the steps: accessing a query statement input by a user through a receiving module in a database interface mode, and sendingthe query statement input by the user to a control module; analyzing a query statement input by a user through a control module, compiling and customizing a corresponding execution plan, receiving thequery statement input by the user through a compiling process, analyzing a JS code, and generating a final ES query statement after compiling; and calling an actuator according to the final ES querystatement through an execution process to obtain a return result. According to the method, interface iteration zero development is realized, and the development speed is greatly increased; interface projects only need to be installed and deployed for the first time, and later project iteration does not need to be published again; QDL is replaced with DQL query to complete ES query; the interface configuration and the smoking test are integrated, so that the interface test time is reduced; the interface smoking test can be published only after passing, so that the interface correctness is improved; interfaces are managed in a centralized manner and are convenient to search and use; and the unified interface can return to the JSON format conveniently.

Description

technical field [0001] The present disclosure relates to the technical field of big data, in particular to an API-based query system and method. Background technique [0002] Currently, there are two common ways to query elasticsearch: [0003] One is to directly write QDL query statements; [0004] The second is to use the client tools provided by elasticsearch to generate QDL query statements by writing code; [0005] When providing a large number of external API interfaces or interface changes, there are several big problems in using the above two methods: [0006] 1. Code development needs to be carried out through programming languages, and related queries are scattered among various modules, which is not convenient for unified maintenance, and will be released and launched frequently; [0007] 2. When there is a problem, it cannot be updated in time, and the request parameters of the interface, the returned result, or the processing logic change cannot be updated in...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/242G06F16/2455G06F16/25G06F8/61
CPCG06F16/2433G06F16/2455G06F16/25G06F8/61
Inventor 李桐张晓东
Owner 上海好屋网信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products