Data inquiry method, device and electronic device

A data query and to-be-queried technology, applied in the query field, can solve the problem of low development efficiency

Active Publication Date: 2018-12-21
BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF4 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the inventor found in the process of implementing the present invention that at least the following problems exist in the prior art: in the prior art, since the query SQL statement is pre-developed by the developer, in order to meet the flexible and changeable needs of users, it is necessary to Developers develop corresponding SQL statements for each potential query requirement, resulting in low development efficiency

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 inquiry method, device and electronic device
  • Data inquiry method, device and electronic device
  • Data inquiry method, device and electronic device

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0103] The data query request defined in DSL language is: query the name of each IDC (computer room) and the name of the Machine (server) in each IDC. Since an IDC (computer room) can contain multiple Machines (servers), the target model between IDC and Machine The relationship between is a one-to-many relationship, and the form of the query result to be returned is:

[0104] [["i.name"],["m.name"]]

[0105] Among them, IDC and Machine are the description information of the identification of each target model; the relationship between IDC and Machine is the model description information of the relationship between each target model; the array [["i.name"], ["m.name" The name in ]] is the attribute to be queried in the target model IDC and Machine.

[0106] S202: Parse the data query request described in the DSL language.

[0107] In this step, the identifiers of multiple target models and the model description information of the relationship between each target model are extr...

example 2

[0202] If the data query request defined in the DSL language is: query the data whose name contains foobar in the target models ModelA, ModelB and ModelC.

[0203] The DSL data query request is obtained, and the query request is parsed into a graph as follows:

[0204]

[0205] b: Model B[name contains "foobar"];

[0206] c: Model C;

[0207] b~>@rel1~>a;

[0208] b~>@rel2~>c;

[0209]}

[0210] Node a is of type A

[0211] Type A {

[0212] name;

[0213]}

[0214] Node b is Type B type

[0215] Type B{

[0216] name;

[0217]}

[0218] Node c is Type C type

[0219] Type C{

[0220] name;

[0221]}

[0222] Among them, a, b and c are the target models ModelA, ModelB and ModelC respectively, and the converted nodes in the graph, b~>@rel1~>c and b~>@rel2~>a respectively define node b and node c and The relationship between node b and node a, where rel1 and rel2 are the names of the relationship, and [name contains "foobar"] is the filter condition, which means ...

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

An embodiment of the present invention provides a data query method, a device and electronic equipment. The method comprises: querying requests based on DSL data, getting the identity of the target model and the properties to be queried, identifying bya target model, obtaining the target model from a pre-stored model, according to the attributes to be queried and the target model, getting a querymodel, further, based on the preset mapping table between model attributes and fields, obtaining a mapping relationship between the attribute to be queried and the corresponding field to be queried, according to the syntax of the SQL statement, converting the mapping relationship between the query model and the attributes to be queried and the corresponding fields to be queried into SQL statements, the automatic generation of SQL statements is realized, which effectively reduces the workload of developers and improves the work efficiency. Moreover, since developers do not need to directly write SQL statements into the system, the risks of SQL statements being injected with viruses and the like are avoided, and the security of the system is improved.

Description

technical field [0001] The invention relates to the technical field of query, in particular to a data query method, device and electronic equipment. Background technique [0002] Large Internet companies need to use various types of middleware services and underlying services to meet the needs of different users and provide better services. Whether it is a middleware service or an underlying service, there are many configuration items, and the configuration can be stored and managed using CMDB (Configuration Management Database). The way to store configuration information is: the developer creates a model attribute table in the database, and then assigns a field for each model attribute of the model, that is, defines which column in the model attribute table stores which model attribute of the model, for example, define Column 1 stores model attribute A, that is, assign field column 1 to model attribute A; then store the instantiated data of the model in the model attribute...

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): G06F17/30
Inventor 章敏杰
Owner BEIJING QIYI CENTURY SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products