CN114356962A - Data query method and device, electronic equipment and storage medium - Google Patents

Data query method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114356962A
CN114356962A CN202111681322.3A CN202111681322A CN114356962A CN 114356962 A CN114356962 A CN 114356962A CN 202111681322 A CN202111681322 A CN 202111681322A CN 114356962 A CN114356962 A CN 114356962A
Authority
CN
China
Prior art keywords
data
query
information
preset
nodes
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.)
Pending
Application number
CN202111681322.3A
Other languages
Chinese (zh)
Inventor
杨学进
赫哲
张连壮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qingyun Science And Technology Co ltd
Original Assignee
Beijing Qingyun Science And Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Qingyun Science And Technology Co ltd filed Critical Beijing Qingyun Science And Technology Co ltd
Priority to CN202111681322.3A priority Critical patent/CN114356962A/en
Publication of CN114356962A publication Critical patent/CN114356962A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a data query method, a data query device, electronic equipment and a storage medium. Wherein, the method comprises the following steps: acquiring data source selection information of a preset operation interface; adding at least one data node to a preset canvas according to the data source selection information; and establishing a query grammar graph according to the data nodes and the relationship establishment information so as to perform data query. The embodiment of the invention realizes the visual operation of data processing in the big data platform, reduces the technical difficulty of data processing, can reduce the difference between data query grammars and enhances the compatibility of data processing of the big data platform.

Description

Data query method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data storage, in particular to a data query method and device, electronic equipment and a storage medium.
Background
With the development of internet technology, data is growing in an explosive trend, how to effectively comb data becomes an important research topic at present, and a large data processing platform is an especially important part in related fields. Whether real-time data processing or offline data processing, Structured Query Language (SQL) is a necessary trend for data organization. Various data processing tools are realized by providing a programming abstraction corresponding to an SQL query engine to provide a uniform entry point for a user, however, SQL has a technical threshold for non-professional users, so that the use of a large data platform cannot be popularized. Meanwhile, because the SQL grammars corresponding to various data tools are different, the compatibility of the big data platform to the data tools is poor, and a data query method with strong compatibility and simple operation is urgently needed in the current big data platform, so that the data sorting efficiency can be improved.
Disclosure of Invention
The invention provides a data query method, a data query device, electronic equipment and a storage medium, which are used for realizing the visual operation of data processing in a big data platform, reducing the data processing difficulty and enhancing the compatibility of the big data platform.
In a first aspect, an embodiment of the present invention provides a data query method, where the method includes:
acquiring data source selection information of a preset operation interface;
adding at least one data node to a preset canvas according to the data source selection information;
and establishing a query grammar graph according to the data nodes and the relationship establishment information so as to perform data query.
In a second aspect, an embodiment of the present invention further provides a data query apparatus, where the apparatus includes:
the data source module is used for acquiring data source selection information of a preset operation interface;
the node adding module is used for adding at least one data node to a preset canvas according to the data source selection information;
and the graph establishing module is used for establishing a query grammar graph according to the data nodes and the relation establishing information so as to perform data query.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the embodiments of the invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the data source selection information is introduced in the preset operation interface, at least one data node is added to the preset canvas according to the data source selection information, and the relationship establishment information is connected with each data node to realize the construction of the query grammar graph, so that the visualized operation of data query is realized, the data query difficulty is reduced, the difference of different grammar realization is reduced, and the compatibility of a large data platform can be improved.
Drawings
FIG. 1 is a flowchart of a data query method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data query method according to a second embodiment of the present invention;
FIG. 3 is a diagram illustrating a structure of a query syntax diagram according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data query device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a data query method provided in an embodiment of the present invention, where this embodiment is applicable to a data operation situation in a big data platform, and the method may be executed by a data query device, where the device may be implemented in a hardware and/or software manner, and referring to fig. 1, the method provided in an embodiment of the present invention specifically includes the following steps:
and step 110, acquiring data source selection information of a preset operation interface.
The preset operation interface may be a visualization interface for performing data operation, where the visualization interface may include a data source and a preset canvas, and it can be understood that the preset operation interface may be an operation page of a large data platform or an operation page of a database system, and the preset operation interface may be generated by using preconfigured parameters. The data source selection information may be information for selecting a data source, and may be a data set identification or selected information of the data set.
In the embodiment of the invention, data source selection information input by a user can be received in a preset operation interface, the acquisition of a data set to be processed can be realized through the data source selection information in the preset operation interface, and the data source selection information can be click information on different data source controls or data set identification numbers input in a text box control and the like.
And step 120, adding at least one data node to a preset canvas according to the data source selection information.
The data nodes can be visual operation controls of data, the data nodes can be located on a preset canvas of a preset operation interface, the data nodes corresponding to different data sources can be different or the same, and for example, the data nodes in different colors can be used for identifying data of different data sources. The preset canvas may be a part of a preset operation interface, and the preset canvas may be used to display a display image corresponding to the data node and receive user information, for example, the preset canvas may display a red data node, receive drag information of a user, and display the dragged data node.
Specifically, one or more data sets may be read according to the data source selection information, and each data set may be added to the preset canvas as the content of each data node, it may be understood that the data nodes in the preset canvas may be displayed in the form of a display control, the content of the data set may be displayed in the display control, and further, the display control may be the user added description information.
And step 130, constructing a query grammar graph according to the data nodes and the relation establishment information so as to perform data query.
The relationship establishing information may establish information of a relationship between data nodes, the established relationship may include an operator relationship, a functional relationship and the like, the operator relationship may include an operation and a relationship between data, and the functional relationship may be a relationship between data processing and operation. The query syntax graph may be a graph including structural relationships of query statements, and the query syntax graph may be specifically a directed acyclic graph, where nodes in the query syntax graph may represent data sets, and edges may represent operations between the data sets.
In the embodiment of the present invention, the relationship establishment information may be received, the relationship establishment information is used to establish the relationship between the data nodes, the data nodes after the relationship establishment may be used as the query syntax graph, and the structured query statement may be generated based on the query syntax graph to implement the query of the data.
According to the embodiment of the invention, the data source selection information is introduced in the preset operation interface, at least one data node is added to the preset canvas according to the data source selection information, and the relationship establishment information is connected with each data node to realize the construction of the query grammar graph, so that the visualized operation of data query is realized, the data query difficulty is reduced, the difference of different grammar realization is reduced, and the compatibility of a large data platform can be improved.
Example two
Fig. 2 is a flowchart of a data query method according to a second embodiment of the present invention, where the second embodiment of the present invention is embodied on the basis of the foregoing second embodiment of the present invention, and referring to fig. 2, the method according to the second embodiment of the present invention specifically includes the following steps:
and 210, displaying at least one data source on a preset operation interface in a visual control mode according to preset configuration information.
The preset configuration information may be configuration parameters for reading a data source, and may include an address of the data source, login authentication information, and the like, and the preset configuration information may be stored in a file or a database. The visual control can be a visual graphic control in a preset operation interface, and the visual control can be used in a dragging or clicking mode.
In the embodiment of the present invention, the preset configuration information may be read, one or more data sources may be obtained by using the address and the login verification information in the preset configuration information, and each data source may be respectively bound in the visual control of the preset operation interface, which is convenient for selecting the data source.
Step 220, receiving dragging information or clicking information corresponding to each visual control as data source selection information.
The dragging information may be information for dragging the visual control, and may be displacement information of the visual control, and the clicking information may be information for functionally clicking the visual control.
In the embodiment of the present invention, dragging information or clicking information may be received on the visual control corresponding to each data source, and the received dragging information or clicking information may be used as data source selection information for selecting the corresponding data source, and it can be understood that when one visual control is clicked or dragged, the data source bound to the visual control may be regarded as being selected.
And step 230, reading the data set according to the dragging information or the clicking information corresponding to the data source selection information.
Specifically, the visual control that is dragged or clicked can be determined according to the data source selection information, the data set bound to the visual control can be read, and it can be understood that the data set can be a local data set or a cloud data set.
Step 240, displaying the data set as a data node on a preset canvas, wherein the display content includes: data set attributes and/or data set contents.
In the embodiment of the present invention, the read data sets may be displayed in the preset canvas in the form of data nodes, the display shape or display position of each data node may be preset according to user requirements, and the attribute and the data set content of the data set may also be displayed in each data node in the preset canvas, where the attribute may include a data set address, a data set type, a service corresponding to the data set, and the like, and the data set content may be the data content of the data set.
Step 250, receiving relationship establishment information in a preset canvas.
Specifically, the relationship establishment information input by the user may be received in the preset canvas, and the relationship establishment information may include establishment of an operator relationship, a function relationship, and the like.
And step 260, constructing operator relation connecting lines among the data nodes in a preset canvas according to the relation establishing information.
The operator relation connecting lines can represent connecting lines with operator relations among the data nodes, the operator relation connecting lines can be divided into a plurality of types according to the types of the data operators, and different operator relation connecting lines can be represented by different marks, colors or linearity.
In the embodiment of the invention, operator relation connecting lines among the data nodes in the budget canvas can be connected according to the relation establishing information, and it can be understood that the operator relation connecting lines can be deleted by a user through a deleting instruction so as to change the structure of the query grammar graph and realize the adjustment of the query result.
And step 270, taking a node graph formed by operator relation connecting lines and data nodes as a query grammar graph.
Specifically, in the embodiment of the present invention, a node image formed by connecting data nodes and operator relations may be used as a query syntax Graph, the query syntax Graph may be a Directed Acyclic Graph (DAG) Graph, and the generated query syntax Graph may be an abstract syntax tree of a structured statement, and may be used to generate the structured query statement under different syntaxes.
Step 280, generating a structured query statement corresponding to the search grammar graph, and querying data according to the structured query statement.
In the embodiment of the present invention, a corresponding structured query statement may be generated according to a structural relationship corresponding to the query syntax graph, the implementation syntax of the structured query statement may be selected by a user or determined by a data source, and the generated structured query statement may be used to implement a corresponding data query.
Step 290, saving the constructed query grammar graph to perform grammar check or repeat query.
The grammar check can be a process of checking a grammar structure of the structured query statement, and the accuracy of data query can be improved.
In the embodiment of the invention, the generated query grammar graph can be stored, and grammar check and repeated query can be carried out on the stored query grammar graph used in the subsequent process.
According to the embodiment of the invention, the data source is displayed on the visual controls of the preset operation interface by using the preset configuration information, the data source selection information of each visual control is received, the data set corresponding to the data source selection information is read, the data set is displayed on the preset canvas in a data node form, the relation establishment information is received, the relation establishment information is used for connecting operator relation connecting lines among all data nodes to form the query grammar graph, the structured query statement corresponding to the query grammar graph is generated, the query result of the structured query statement is obtained, and the query grammar graph is stored for grammar check and repeated query, so that the visual operation of data query is realized, the data query difficulty is reduced, the difference of different grammar realization is reduced, and the compatibility of a large data platform can be improved.
Further, on the basis of the above embodiment of the present invention, the data nodes at least include operator nodes and function nodes.
In the embodiment of the present invention, the data nodes added in the preset canvas may include operator nodes and function nodes, where the operator nodes may be nodes for storing operator information used for data processing, and the function nodes may be nodes for storing processing and operation information of data. Further, according to different types of data processing and operation, the function nodes may include an average AVG node, a statistical count node, a maximum Max node, a Median media node, and the like, and the operator nodes are divided into MqSQL nodes, Oracle nodes, and the like according to the query syntax.
Further, on the basis of the above embodiment of the present invention, receiving the relationship establishment information in the preset canvas includes:
and receiving a user dragging instruction or a right key operation instruction by a display control corresponding to the data node as the relationship establishment information.
In the embodiment of the invention, different corresponding data nodes can be selected for connection on the display control of the data nodes in a mode of user dragging or right key operation, so that the acquisition of the relationship establishment information is realized.
For example, fig. 3 is a schematic structural diagram of a query syntax diagram according to a second embodiment of the present invention, referring to fig. 3, a data set in a data processing process may be abstracted into a data node, the data node is placed in a canvas in a manner of selecting from a data list and then dragging, and the added node may be edited or deleted in a manner of dragging by mouse clicking, right-key operation, or shortcut. The operation and the relation between the data are abstracted into relational operator nodes, the operator nodes and the data nodes operate the same, and then the association relation between the data nodes and the operator nodes is drawn by adopting a vectorized graph of SVG. And the relation of two or even a plurality of nodes is constructed by clicking the relation end points defined around the data nodes and then dragging the relation end points to the target operator nodes. The connection line of the association relation between the nodes can also be edited or deleted by means of right key operation or shortcut keys and the like. And the processing and operation of data can be abstracted into function nodes. The function nodes operate in the same manner as the relational operator nodes. In the embodiment of the present invention, the query syntax map may be exported as a graphics file, and the importing and exporting of the query syntax map may be implemented by using a preset interface, where the interface may include a processing procedure of displaying the query syntax map in a canvas and a processing procedure of saving the query syntax map in the canvas as an image file.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a data query device provided in a third embodiment of the present invention, which is capable of executing a data query method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The device can be implemented by software and/or hardware, and specifically comprises: a data source module 301, a node addition module 302, and a graph creation module 303.
The data source module 301 is configured to obtain data source selection information of a preset operation interface.
A node adding module 302, configured to add at least one data node to a preset canvas according to the data source selection information.
And the graph establishing module 303 is configured to establish a query syntax graph according to each data node and the relationship establishing information to perform data query.
According to the embodiment of the invention, the data source selection information is introduced into the preset operation interface through the data source module, the node adding module adds at least one data node into the preset canvas according to the data source selection information, and the graph establishing module is connected with each data node through the relation establishing information to realize the construction of the query grammar graph, so that the visual operation of data query is realized, the data query difficulty is reduced, the difference of different grammar realization is reduced, and the compatibility of a large data platform can be improved.
Further, on the basis of the above embodiment of the invention, the data source module 301 includes:
and the information display unit is used for displaying at least one data source on the preset operation interface in a visual control form according to preset configuration information.
And the information receiving unit is used for receiving dragging information or clicking information corresponding to each visual control as the data source selection information.
Further, on the basis of the above embodiment of the present invention, the node adding module 302 includes:
and the information reading unit is used for reading the data set according to the dragging information or the clicking information corresponding to the data source selection information.
A node display unit, configured to display the data set as the data node on the preset canvas, where the display content includes: data set attributes and/or data set contents.
Further, on the basis of the above embodiment of the present invention, the graph creating module 303 includes:
and the relation receiving unit is used for receiving the relation establishment information in the preset canvas.
And the continuous display unit is used for constructing operator relation connecting lines among the data nodes in the preset canvas according to the relation establishment information.
And the query graph unit is used for taking a node graph formed by the operator relation connecting line and the data node as the query grammar graph.
And the information query unit is used for generating a structured query statement corresponding to the search grammar graph and querying data according to the structured query statement.
Further, on the basis of the embodiment of the present invention, the display image of the operator relationship connecting line and the data node in the canvas is preset in the apparatus as a vectorized image.
Further, on the basis of the above embodiment of the present invention, the relation receiving unit in the apparatus is specifically configured to:
and receiving a user dragging instruction or a right key operation instruction by a display control corresponding to the data node as the relationship establishment information.
Further, on the basis of the above embodiment of the invention, the apparatus further includes: and the graph storage module is used for storing the constructed query grammar graph to carry out grammar check or repeated query.
Example four
Fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, and fig. 5 shows a block diagram of a computer device 312 suitable for implementing an embodiment of the present invention. The computer device 312 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention. Device 312 is typically a computing device that implements a data query method.
As shown in FIG. 5, computer device 312 is in the form of a general purpose computing device. The components of computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that couples the various system components including the storage device 328 and the processors 316.
Bus 318 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Computer device 312 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 328 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 330 and/or cache Memory 332. The computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 by one or more data media interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which may comprise an implementation of a network environment, or some combination thereof. Program modules 326 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), with one or more devices that enable a user to interact with the computer device 312, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 312 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 322. Also, computer device 312 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), etc.) and/or a public Network, such as the internet, via Network adapter 320. As shown, network adapter 320 communicates with the other modules of computer device 312 via bus 318. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 316 executes various functional applications and data processing, such as implementing the data query method provided by the above-described embodiments of the present invention, by executing programs stored in the storage device 328.
EXAMPLE five
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processing apparatus, implements a data query method as in the embodiment of the present invention. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the computer device; or may exist separately and not be incorporated into the computer device.
The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: acquiring data source selection information of a preset operation interface; adding at least one data node to a preset canvas according to the data source selection information; and establishing a query grammar graph according to the data nodes and the relationship establishment information so as to perform data query.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for data query, the method comprising:
acquiring data source selection information of a preset operation interface;
adding at least one data node to a preset canvas according to the data source selection information;
and establishing a query grammar graph according to the data nodes and the relationship establishment information so as to perform data query.
2. The method according to claim 1, wherein the acquiring of the data source selection information of the preset operation interface includes:
displaying at least one data source on the preset operation interface in a visual control form according to preset configuration information;
and receiving dragging information or clicking information corresponding to each visual control as the data source selection information.
3. The method of claim 1, wherein the adding at least one data node to a preset canvas according to the data source selection information comprises:
reading a data set according to dragging information or clicking information corresponding to the data source selection information;
and displaying the data set as the data node on the preset canvas, wherein the display content comprises: data set attributes and/or data set contents.
4. The method of claim 1, wherein the constructing a query syntax graph for data query according to the data node and relationship building information comprises:
receiving the relation establishment information in the preset canvas;
establishing operator relation connecting lines among the data nodes in the preset canvas according to the relation establishing information;
taking a node graph formed by the operator relation connecting lines and the data nodes as the query grammar graph;
and generating a structured query statement corresponding to the search grammar graph, and querying data according to the structured query statement.
5. The method of claim 4, wherein the data nodes comprise at least operator nodes and function nodes.
6. The method according to claim 4, wherein the receiving the relationship establishing information in the preset canvas comprises:
and receiving a user dragging instruction or a right key operation instruction by a display control corresponding to the data node as the relationship establishment information.
7. The method of claim 1, further comprising:
and saving the constructed query grammar graph to carry out grammar check or repeated query.
8. A data query apparatus, characterized in that the apparatus comprises:
the data source module is used for acquiring data source selection information of a preset operation interface;
the node adding module is used for adding at least one data node to a preset canvas according to the data source selection information;
and the graph establishing module is used for establishing a query grammar graph according to the data nodes and the relation establishing information so as to perform data query.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111681322.3A 2021-12-28 2021-12-28 Data query method and device, electronic equipment and storage medium Pending CN114356962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111681322.3A CN114356962A (en) 2021-12-28 2021-12-28 Data query method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111681322.3A CN114356962A (en) 2021-12-28 2021-12-28 Data query method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114356962A true CN114356962A (en) 2022-04-15

Family

ID=81106125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111681322.3A Pending CN114356962A (en) 2021-12-28 2021-12-28 Data query method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114356962A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118609A (en) * 2022-07-13 2022-09-27 深圳市冠辰科技有限公司 MESH network-based control method and computer-readable storage medium
CN115455035A (en) * 2022-11-10 2022-12-09 广州思迈特软件有限公司 Data query model construction method and computer-readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118609A (en) * 2022-07-13 2022-09-27 深圳市冠辰科技有限公司 MESH network-based control method and computer-readable storage medium
CN115455035A (en) * 2022-11-10 2022-12-09 广州思迈特软件有限公司 Data query model construction method and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN110096584B (en) Response method and device
US11727200B2 (en) Annotation tool generation method, annotation method, electronic device and storage medium
CN111708801A (en) Report generation method and device and electronic equipment
CN111159220B (en) Method and apparatus for outputting structured query statement
CN114356962A (en) Data query method and device, electronic equipment and storage medium
WO2022111591A1 (en) Page generation method and apparatus, storage medium, and electronic device
US11200231B2 (en) Remote query optimization in multi data sources
CN110975293A (en) Method, device, server and medium for establishing resource reference relation table
CN113971037A (en) Application processing method and device, electronic equipment and storage medium
CN113419789A (en) Method and device for generating data model script
CN113190517B (en) Data integration method and device, electronic equipment and computer readable medium
CN112988915A (en) Data display method and device
CN115344688B (en) Business data display method and device, electronic equipment and computer readable medium
CN114265846A (en) Data operation method and device, electronic equipment and storage medium
CN114265966A (en) Data processing method and device, electronic equipment and storage medium
CN114090124A (en) Data processing method, data processing device, computer equipment and storage medium
CN115756452A (en) Target page code generation method, device, storage medium and program product
CN113393288A (en) Order processing information generation method, device, equipment and computer readable medium
CN112148751A (en) Method and device for querying data
CN112307061A (en) Method and device for querying data
CN117370361B (en) Data table operation method, device, electronic equipment and computer readable medium
CN115563183B (en) Query method, query device and program product
CN115994151B (en) Data request changing method, device, electronic equipment and computer readable medium
CN110727654B (en) Data extraction method and device for distributed system, server and storage medium

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
CB02 Change of applicant information

Address after: 100000 Unit 501A, Floor 5, 101, Building 1, Yard 5, Laiguangying West Road, Chaoyang District, Beijing

Applicant after: Beijing Qingyun Science and Technology Co.,Ltd.

Address before: 100020 601, 6 floor, 16 building, No. 36 Chuang Yuan Road, Chaoyang District, Beijing.

Applicant before: Beijing Qingyun Science and Technology Co.,Ltd.

CB02 Change of applicant information