[go: up one dir, main page]

CN109918394B - Data query method, system, computer device and computer readable storage medium - Google Patents

Data query method, system, computer device and computer readable storage medium Download PDF

Info

Publication number
CN109918394B
CN109918394B CN201910065353.2A CN201910065353A CN109918394B CN 109918394 B CN109918394 B CN 109918394B CN 201910065353 A CN201910065353 A CN 201910065353A CN 109918394 B CN109918394 B CN 109918394B
Authority
CN
China
Prior art keywords
query
node
data
database
identifier
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.)
Active
Application number
CN201910065353.2A
Other languages
Chinese (zh)
Other versions
CN109918394A (en
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201910065353.2A priority Critical patent/CN109918394B/en
Publication of CN109918394A publication Critical patent/CN109918394A/en
Application granted granted Critical
Publication of CN109918394B publication Critical patent/CN109918394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data query method, a data query system, a computer device and a computer readable storage medium. The data query method comprises the following steps: acquiring attribute information of a plurality of databases, and generating a tree-shaped selection model according to the attribute information of the databases; performing association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame; acquiring options selected in the selection frame and query information input in the input frame, and generating a query instruction according to the options in the selection frame and the query information in the input frame; and returning query results of the query instructions for performing data query operation on a plurality of databases. According to the method, a plurality of databases are simplified and integrated into the tree-shaped selection model based on the data processing technology, and the model is associated with the data query frame, so that the data query threshold is reduced, and the user query experience is improved.

Description

Data query method, system, computer device and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data query method, a data query system, a computer device, and a computer readable storage medium.
Background
Database systems have become an essential component in the existing software development field, and the data access function is the most basic function of the database system. The traditional query data access method is realized by calling a database special interface to write a structured query language (Structured Query Language, SQL for short), and has higher requirements on the database foundation of a software developer, and a special SQL query statement needs to be written according to a query field when a query record is obtained. However, for other than software developers, there is a certain difficulty in writing SQL statements, which reduces the user's query experience.
Disclosure of Invention
In view of the above, the present application provides a data query method, a system, a computer device and a computer readable storage medium, which do not need to input SQL statements to perform data query, thereby improving the data query experience of users.
An embodiment of the present application provides a data query method, including:
acquiring attribute information of a plurality of databases, and generating a tree-shaped selection model according to the attribute information of the databases;
performing association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame;
acquiring options selected in the selection frame and query information input in the input frame, and generating a query instruction according to the options in the selection frame and the query information in the input frame; and
And returning query results of the query instructions for performing data query operation on a plurality of databases.
Preferably, the attribute information includes: the tree selection model comprises a database identification node, a data table identification node, a field identification node and an annotation identification node.
Preferably, each database includes at least one data table, each data table includes at least one field, and the step of generating a tree selection model according to attribute information of a plurality of databases includes:
connecting the database identification node to a root node, connecting the data table identification node to a corresponding database identification node, connecting the field identification node to a corresponding data table identification node, and connecting the annotation identification node to a corresponding data table identification node or field identification node.
Preferably, the preset query interface includes a multi-level selection box, and the step of associating the node of the tree-shaped selection model with the selection box of the preset query interface includes:
associating the database identification node with a first level selection frame of the preset query interface;
associating the data table identification node with a second level selection frame of the preset query interface;
associating the field identification node with a third level selection frame of the preset query interface; and
And associating the annotation identification node with a fourth-level selection box of the preset query interface.
Preferably, before the step of obtaining the selected option in the selection box and the query information input in the input box, the method further includes:
receiving a data query request and acquiring identification information of the data query request;
judging whether the data query request has query authority or not according to the identification information; and
And when the data query request has the query right, jumping to the preset query interface.
Preferably, the step of generating the query instruction according to the options in the selection box and the query information in the input box includes:
and packaging the options in the selection box and the query information in the input box into an SQL query instruction.
Preferably, the step of returning the query results of the query instruction performing the data query operation on the plurality of databases includes:
inputting the query instruction to each of the databases using multithreading; and
And receiving the query result of each database, and merging and outputting the query result of each database.
An embodiment of the present application provides a data query system, including:
the first generation module is used for acquiring attribute information of a plurality of databases and generating a tree-shaped selection model according to the attribute information of the databases;
the association module is used for carrying out association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame;
the second generation module is used for acquiring the options selected in the selection frame and the query information input in the input frame, and generating a query instruction according to the options in the selection frame and the query information in the input frame; and
And the query module is used for returning query results of the query instructions for performing data query operation on the databases.
An embodiment of the present application provides a computer apparatus, where the computer apparatus includes a processor and a memory, where the memory stores a plurality of computer programs, and the processor is configured to implement the steps of the data query method described above when executing the computer programs stored in the memory.
An embodiment of the application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data query method as described above.
According to the data query method, the system, the computer device and the computer readable storage medium, the tree-shaped selection model is generated according to the attribute information of the databases, the nodes of the tree-shaped selection model are associated with the query frame of the query interface, the user can select the databases to be queried by himself or herself in a self-service mode, the query frame supports table names, field names, notes and the like to query, special SQL query sentences do not need to be written, database data query experience is improved, and database query door frames are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the steps of a data polling method in an embodiment of the application.
FIG. 2 is a functional block diagram of a data query system in accordance with one embodiment of the present application.
FIG. 3 is a schematic diagram of a computer device according to an embodiment of the application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description. The embodiments of the present application and the features in the embodiments may be combined with each other without collision.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, and the described embodiments are merely some, rather than all, embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to fall within the scope of the present application.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
Preferably, the data query method of the present application is applied in one or more computer devices. The computer apparatus is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, and the like.
The computer device may be a computing device such as a desktop computer, a notebook computer, a tablet computer, a server, etc. The computer device can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
Embodiment one:
FIG. 1 is a flowchart showing the steps of a data query method according to a preferred embodiment of the present application. The order of the steps in the flow diagrams may be changed, and some steps may be omitted, according to different needs.
Referring to fig. 1, the data query method specifically includes the following steps.
And S11, acquiring attribute information of a plurality of databases, and generating a tree-shaped selection model according to the attribute information of the databases.
In one embodiment, a database management system (DBMS) manages a plurality of databases, and attribute information of the plurality of databases can be acquired by communicating with the DBMS system. The attribute information of the database may include a database identifier, a data table identifier, a field identifier, and an annotation identifier. Each database may include one or more data tables, each of which may include one or more fields, each of which may include one or more data items. Each field may include one or more annotations and each data table may also include one or more annotations.
Each database is configured with a database identifier, each data table is configured with a data table identifier, each field is configured with a field identifier, when the data table has notes, the data table also has a note identifier, and when the field has notes, the field also has a note identifier. The database identifier, the data table identifier, the field identifier, and the annotation identifier may be nodes of the tree selection model. Each database identifier in the tree-shaped selection model is connected with a preset root node, each data table identifier node is connected with a corresponding database identifier node, each field identifier node is connected with a corresponding data table identifier node, and the annotation identifier node is connected with a corresponding data table identifier node or a corresponding field identifier node.
For example, the plurality of databases includes a first database and a second database, and when the user needs to query the data, the first database and the second database are available for the user to query. The first database is provided with a first database identifier, and the second database is provided with a second database identifier; the first database comprises a first data table, the first data table can comprise a first field and a second field, and the first data table also has a corresponding first annotation; the second database may include a second data table and a third data table, the second data table may include a third field, the third data table includes a fourth field, the fourth field also having a corresponding second annotation. In the tree selection model, the first database identification node and the second database identification node are both connected to a root node, the first data table identification node is connected to the first database identification node, the first annotation identification node is connected to the first data table identification node, and the first field identification node and the second field identification node are both connected to the first data table identification node; the second data table identification node and the third data table identification node are both connected with the second database identification node, the third field identification node is connected with the second data table identification node, the fourth field identification node is connected with the third data table identification node, and the second annotation identification node is connected with the fourth field identification node.
In an embodiment, a UI interface may also be established according to the tree selection model, so as to view the data dictionaries of the multiple databases on the UI interface. The UI interface may include a page mode, a pagination mode, and a UI typesetting layout. The page modes may include a relative layout page style and an absolute layout page style. The paging mode can provide multi-page configuration, each page can be provided with a header, for a data table with a table field exceeding a certain amount or a data table with a division of primary and secondary pages, the paging mode can be set into multiple pages, if the page mode selects a page style with relative layout, the arrangement layout mode needs to be set when the multi-page configuration is carried out, and the method comprises the following steps: horizontal rows, vertical rows, and the number of rows and columns. When UI typesetting layout is carried out, if the page mode is selected by a relative layout page style, the page modes can be added into the page one by one according to the required sequence of the fields, and if the page mode is selected by an absolute layout page style, typesetting layout can be carried out through a visual graphical interface.
Step S12, performing association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame.
In an embodiment, the preset query interface may be integrated into the UI interface, and the query interface may include one or more selection boxes and one or more input boxes. The selection box supports a drop-down selection operation and the input box supports an input query information operation.
In an embodiment, the preset query interface may have a first level selection box, a second level selection box, a third level selection box, and a fourth level selection box. The first hierarchical selection box may be associated with a database identification node in the tree selection model, the second hierarchical selection box may be associated with a data table identification node in the tree selection model, the third hierarchical selection box may be associated with a field identification node in the tree selection model, and the fourth hierarchical selection box may be associated with an annotation identification node in the tree selection model.
For example, the plurality of databases includes a first database having a first database identification and a second database having a second database identification; the first database comprises a first data table, the first data table can comprise a first field and a second field, and the first data table also has a corresponding first annotation; the second database may include a second data table and a third data table, the second data table may include a third field, the third data table includes a fourth field, the fourth field also having a corresponding second annotation. When the tree selection model is associated with the selection boxes, the first-level selection box can display the first database and the second database, the second-level selection box can display the first to third data tables, the third-level selection box can display the first to fourth fields, and the fourth-level selection box can display the first to second comments. It will be appreciated that options displayed within the second level selection box may be associated with the first level selection box, options displayed within the third level selection box may be associated with the second level selection box, and options displayed within the fourth level selection box may be associated with the second level selection box or the third level selection box. For example, when the user selects the first database within the first hierarchical selection box, the second hierarchical selection box may provide the first data table while other data tables are not displayed; when a user selects a second database in the first-level selection frame, the second-level selection frame can provide a second data table and a third data table, and other data tables are not displayed; when the user continues to select the third data table in the second hierarchical selection frame, the fourth field can be provided in the third hierarchical selection frame, and other fields are not displayed.
It is to be appreciated that the selection box also supports simultaneous selection of multiple query conditions, e.g., the first level selection box may support simultaneous selection of the first database and the second database.
Step S13, acquiring the options selected in the selection frame and the query information input in the input frame, and generating a query instruction according to the options in the selection frame and the query information in the input frame.
In one embodiment, the selected options in the selection box and the query information in the input box may be packaged into an SQL query statement, so as to facilitate the execution of the data query operation in the database. The preset query interface can be provided with a query icon, and when the query icon is triggered, options in the selection frame and query information in the input frame can be packaged into SQL query sentences, so that query operation is executed in a database.
In an embodiment, the preset query interface has a permission attribute, and the query interface can be linked only when a query request with a corresponding permission attribute is received. For example, the user attribute information may include a user name and/or a user password. When requesting to link to the query interface, the user may be required to input corresponding user attribute information (user name and/or password) for verification, and enter the preset query interface after verification is successful. Specifically, before the step of obtaining the selected option in the selection box and the query information input in the input box, the method further includes: receiving a data query request and acquiring identification information of the data query request; judging whether the data query request has query authority or not according to the identification information; and when the data query request has the query right, jumping to the preset query interface.
And step S14, returning query results of the query instructions for performing data query operation on the databases.
In an embodiment, when a data query operation is required to be performed on a plurality of databases, in order to increase the query speed, multithreading may be used to input the query instruction to each database for parallel processing, then the query result of each database is received, and the query results of each database are combined and output to obtain a final data query result; when only one database is needed to perform data query operation, a single thread can be utilized to input the query instruction into the target database to perform data query operation. The final data query result can be packaged into a file for output or directly output and display through the preset query interface.
According to the data query method, the tree-shaped selection model is generated according to the attribute information of the databases, the nodes of the tree-shaped selection model are associated with the query frame of the query interface, the user can select the database to be queried by himself/herself, the query frame supports table names, field names, notes and the like to query, special SQL query sentences are not required to be written, database data query experience is improved, and database query door frames are reduced.
Embodiment two:
FIG. 2 is a functional block diagram of a data query system according to a preferred embodiment of the present application.
Referring to fig. 2, the data query system 10 may include a first generation module 101, an association module 102, a second generation module 103, a query module 104, and an authentication jump module 105.
The first generation module 101 is configured to obtain attribute information of a plurality of databases, and generate a tree selection model according to the attribute information of the plurality of databases.
In an embodiment, the DBMS system manages a plurality of databases, and the first generation module 101 may acquire attribute information of a plurality of the databases by communicating with the DBMS system. The attribute information of the database may include a database identifier, a data table identifier, a field identifier, and an annotation identifier. Each database may include one or more data tables, each of which may include one or more fields, each of which may include one or more data items. Each field may include one or more annotations and each data table may also include one or more annotations.
Each database is configured with a database identifier, each data table is configured with a data table identifier, each field is configured with a field identifier, when the data table has notes, the data table also has a note identifier, and when the field has notes, the field also has a note identifier. The database identifier, the data table identifier, the field identifier, and the annotation identifier may be nodes of the tree selection model. Each database identifier in the tree-shaped selection model is connected with a preset root node, each data table identifier node is connected with a corresponding database identifier node, each field identifier node is connected with a corresponding data table identifier node, and the annotation identifier node is connected with a corresponding data table identifier node or a corresponding field identifier node.
For example, the plurality of databases includes a first database and a second database, and when the user needs to query the data, the first database and the second database are available for the user to query. The first database is provided with a first database identifier, and the second database is provided with a second database identifier; the first database comprises a first data table, the first data table can comprise a first field and a second field, and the first data table also has a corresponding first annotation; the second database may include a second data table and a third data table, the second data table may include a third field, the third data table includes a fourth field, the fourth field also having a corresponding second annotation. In the tree selection model, the first database identification node and the second database identification node are both connected to a root node, the first data table identification node is connected to the first database identification node, the first annotation identification node is connected to the first data table identification node, and the first field identification node and the second field identification node are both connected to the first data table identification node; the second data table identification node and the third data table identification node are both connected with the second database identification node, the third field identification node is connected with the second data table identification node, the fourth field identification node is connected with the third data table identification node, and the second annotation identification node is connected with the fourth field identification node.
In an embodiment, the first generating module 101 may further establish a UI according to the tree selection model, so as to view the data dictionary of the plurality of databases on the UI. The UI interface may include a page mode, a pagination mode, and a UI typesetting layout. The page modes may include a relative layout page style and an absolute layout page style. The paging mode can provide multi-page configuration, each page can be provided with a header, for a data table with a table field exceeding a certain amount or a data table with a division of primary and secondary pages, the paging mode can be set into multiple pages, if the page mode selects a page style with relative layout, the arrangement layout mode needs to be set when the multi-page configuration is carried out, and the method comprises the following steps: horizontal rows, vertical rows, and the number of rows and columns. When UI typesetting layout is carried out, if the page mode is selected by a relative layout page style, the page modes can be added into the page one by one according to the required sequence of the fields, and if the page mode is selected by an absolute layout page style, typesetting layout can be carried out through a visual graphical interface.
The association module 102 is configured to associate a node of the tree selection model with a selection box of a preset query interface, where the preset query interface includes at least one selection box and at least one input box.
In an embodiment, the preset query interface may be integrated into the UI interface, and the query interface may include one or more selection boxes and one or more input boxes. The selection box supports a drop-down selection operation and the input box supports an input query information operation.
In an embodiment, the preset query interface may have a first level selection box, a second level selection box, a third level selection box, and a fourth level selection box. The association module 102 may configure the first hierarchical selection box to associate with a database identifier node in the tree selection model, the second hierarchical selection box to associate with a data table identifier node in the tree selection model, the third hierarchical selection box to associate with a field identifier node in the tree selection model, and the fourth hierarchical selection box to associate with an annotation identifier node in the tree selection model.
For example, the plurality of databases includes a first database having a first database identification and a second database having a second database identification; the first database comprises a first data table, the first data table can comprise a first field and a second field, and the first data table also has a corresponding first annotation; the second database may include a second data table and a third data table, the second data table may include a third field, the third data table includes a fourth field, the fourth field also having a corresponding second annotation. When the tree selection model is associated with the selection boxes, the first-level selection box can display the first database and the second database, the second-level selection box can display the first to third data tables, the third-level selection box can display the first to fourth fields, and the fourth-level selection box can display the first to second comments. It will be appreciated that options displayed within the second level selection box may be associated with the first level selection box, options displayed within the third level selection box may be associated with the second level selection box, and options displayed within the fourth level selection box may be associated with the second level selection box or the third level selection box. For example, when the user selects the first database within the first hierarchical selection box, the second hierarchical selection box may provide the first data table while other data tables are not displayed; when a user selects a second database in the first-level selection frame, the second-level selection frame can provide a second data table and a third data table, and other data tables are not displayed; when the user continues to select the third data table in the second hierarchical selection frame, the fourth field can be provided in the third hierarchical selection frame, and other fields are not displayed.
It is to be appreciated that the selection box also supports simultaneous selection of multiple query conditions, e.g., the first level selection box may support simultaneous selection of the first database and the second database.
The second generating module 103 is configured to obtain the option selected in the selection box and the query information input in the input box, and generate a query instruction according to the option in the selection box and the query information in the input box.
In an embodiment, the second generating module 103 may encapsulate the selected option in the selection box and the query information in the input box into an SQL query statement, so as to facilitate performing the data query operation in the database. The preset query interface can be provided with a query icon, and when the query icon is triggered, options in the selection frame and query information in the input frame can be packaged into SQL query sentences, so that query operation is executed in a database.
In an embodiment, the preset query interface has a permission attribute, and the query interface can be linked only when a query request with a corresponding permission attribute is received. For example, the user attribute information may include a user name and/or a user password. When the request is linked to the query interface, the user can be required to input corresponding user attribute information (user name and/or password) to perform verification, and enter the preset query interface to perform data query operation after the verification is successful.
The authentication jump module 105 is configured to receive a data query request, obtain identification information of the data query request, and determine whether the data query request has a query authority according to the identification information.
In one embodiment, the authentication jump module 105 jumps to the preset query interface when the data query request is deemed to have query rights. When the data query request is determined to not have the query right, the skip operation is not performed, and the prompt information of the non-right query database can be output.
The query module 104 is configured to return query results of the query instruction for performing data query operations on a plurality of databases.
In an embodiment, when a data query operation needs to be performed on a plurality of databases, in order to increase the query speed, the query module 104 may input the query instruction to each database by using multiple threads to perform parallel processing, then receive the query result of each database, and combine and output the query result of each database to obtain a final data query result; when only one database is needed for data query operation, the query module 104 may use only a single thread to input the query instruction to the target database for data query operation. The final data query result can be packaged into a file for output or directly output and display through the preset query interface.
According to the data query method, the tree-shaped selection model is generated according to the attribute information of the databases, the nodes of the tree-shaped selection model are associated with the query frame of the query interface, the user can select the database to be queried by himself/herself, the query frame supports table names, field names, notes and the like to query, special SQL query sentences are not required to be written, database data query experience is improved, and database query door frames are reduced.
FIG. 3 is a schematic diagram of a computer device according to a preferred embodiment of the application.
The computer device 1 comprises a memory 20, a processor 30 and a computer program 40, such as a data query program, stored in the memory 20 and executable on the processor 30. The steps of the data query method embodiment described above, such as steps S11 to S14 shown in fig. 1, are implemented when the processor 30 executes the computer program 40. Alternatively, the processor 30, when executing the computer program 40, performs the functions of the modules of the data query system embodiment described above, such as modules 101-105 in fig. 2.
Illustratively, the computer program 40 may be partitioned into one or more modules/units that are stored in the memory 20 and executed by the processor 30 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program 40 in the computer device 1. For example, the computer program 40 may be partitioned into a first generation module 101, an association module 102, a second generation module 103, a query module 104, and an authentication jump module 105 in fig. 2. For specific functions of each module, see embodiment two.
The computer device 1 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the computer apparatus 1 and does not constitute a limitation of the computer apparatus 1, and may comprise more or less components than shown, or may combine certain components, or different components, e.g. the computer apparatus 1 may further comprise input and output devices, network access devices, buses, etc.
The processor 30 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor 30 may be any conventional processor or the like, the processor 30 being the control center of the computer device 1, the various interfaces and lines being used to connect the various parts of the overall computer device 1.
The memory 20 may be used to store the computer program 40 and/or modules/units, and the processor 30 may perform various functions of the computer device 1 by executing or executing the computer program and/or modules/units stored in the memory 20, and invoking data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer apparatus 1 (such as audio data, phonebook, etc.), and the like. In addition, the memory 20 may include high-speed random access memory, and may also include nonvolatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid state storage device.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
In the several embodiments provided by the present application, it should be understood that the disclosed computer apparatus and method may be implemented in other ways. For example, the above-described embodiments of the computer apparatus are merely illustrative, and for example, the division of the units is merely a logical function division, and there may be other manners of division when actually implemented.
In addition, each functional unit in the embodiments of the present application may be integrated in the same processing unit, or each unit may exist alone physically, or two or more units may be integrated in the same unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. Multiple units or computer means recited in the computer means claim may also be implemented by means of software or hardware by means of the same unit or computer means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (5)

1. A method of querying data, the method comprising:
acquiring attribute information of a plurality of databases, wherein the attribute information comprises a database identifier, a data table identifier, a field identifier and an annotation identifier, each database comprises at least one data table, and each data table comprises at least one field;
connecting a database identification node to a root node, connecting a data table identification node to a corresponding database identification node, connecting a field identification node to a corresponding data table identification node, and connecting an annotation identification node to a corresponding data table identification node or field identification node to generate a tree selection model, wherein the tree selection model comprises the database identification node, the data table identification node, the field identification node and the annotation identification node;
performing association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame;
receiving a data query request and acquiring identification information of the data query request;
judging whether the data query request has query authority or not according to the identification information;
when the data query request has the query right, jumping to a preset query interface;
acquiring options selected in the selection frame and query information input in the input frame, and packaging the options in the selection frame and the query information in the input frame into an SQL query instruction; and
Returning query results of the SQL query instructions for performing data query operation on a plurality of databases;
the step of associating the nodes of the tree-shaped selection model with the selection frame of the preset query interface comprises the following steps:
associating the database identification node with a first level selection frame of the preset query interface;
associating the data table identification node with a second level selection frame of the preset query interface;
associating the field identification node with a third level selection frame of the preset query interface; and
And associating the annotation identification node with a fourth-level selection box of the preset query interface.
2. The data query method of claim 1, wherein the step of returning query results of the query instruction for data query operations at a plurality of the databases comprises:
inputting the query instruction to each of the databases using multithreading; and
And receiving the query result of each database, and merging and outputting the query result of each database.
3. A data query system, the system comprising:
the first generation module is used for acquiring attribute information of a plurality of databases, wherein the attribute information comprises a database identifier, a data table identifier, a field identifier and an annotation identifier, each database comprises at least one data table, and each data table comprises at least one field;
the first generation module is further configured to connect a database identifier node to a root node, connect a data table identifier node to a corresponding database identifier node, connect a field identifier node to a corresponding data table identifier node, and connect an annotation identifier node to a corresponding data table identifier node or a field identifier node, so as to generate a tree selection model, where the tree selection model includes the database identifier node, the data table identifier node, the field identifier node, and the annotation identifier node;
the association module is used for carrying out association operation on the nodes of the tree-shaped selection model and a selection frame of a preset query interface, wherein the preset query interface comprises at least one selection frame and at least one input frame;
the second generation module is used for receiving a data query request, acquiring identification information of the data query request, judging whether the data query request has query authority according to the identification information, jumping to a preset query interface when the data query request has the query authority, acquiring options selected in the selection frame and query information input in the input frame, and packaging the options in the selection frame and the query information in the input frame into an SQL query instruction; and
The query module is used for returning query results of the SQL query instructions for performing data query operation on a plurality of databases;
the association module is further configured to associate the database identifier node with a first hierarchical selection frame of the preset query interface, associate the data table identifier node with a second hierarchical selection frame of the preset query interface, associate the field identifier node with a third hierarchical selection frame of the preset query interface, and associate the comment identifier node with a fourth hierarchical selection frame of the preset query interface.
4. A computer device comprising a processor and a memory, on which memory a number of computer programs are stored, characterized in that the processor is adapted to implement the steps of the data query method as claimed in claim 1 or 2 when executing the computer programs stored in the memory.
5. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the data query method as claimed in claim 1 or 2.
CN201910065353.2A 2019-01-23 2019-01-23 Data query method, system, computer device and computer readable storage medium Active CN109918394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910065353.2A CN109918394B (en) 2019-01-23 2019-01-23 Data query method, system, computer device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910065353.2A CN109918394B (en) 2019-01-23 2019-01-23 Data query method, system, computer device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109918394A CN109918394A (en) 2019-06-21
CN109918394B true CN109918394B (en) 2023-11-28

Family

ID=66960655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910065353.2A Active CN109918394B (en) 2019-01-23 2019-01-23 Data query method, system, computer device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109918394B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580065A (en) * 2019-09-29 2021-03-30 北京京东尚科信息技术有限公司 Data query method and device
CN113064911B (en) * 2020-01-02 2024-04-19 北京中关村科金技术有限公司 Query method, device and storage medium
CN111680110B (en) * 2020-05-21 2023-02-03 深圳赛安特技术服务有限公司 Data processing method, data processing device, BI system and medium
CN112632115B (en) * 2020-07-31 2025-04-01 银盛支付服务股份有限公司 A data query method and system based on BI
CN111986331B (en) * 2020-08-18 2024-03-15 上海外高桥造船有限公司 Smart3D attribute viewing system for mailbox design
CN112417027A (en) * 2020-11-19 2021-02-26 青岛以萨数据技术有限公司 Data processing method, system, terminal and medium for visual operation database
US11741093B1 (en) 2021-07-21 2023-08-29 T-Mobile Usa, Inc. Intermediate communication layer to translate a request between a user of a database and the database
CN113761009A (en) * 2021-11-09 2021-12-07 深圳市明源云科技有限公司 Personnel selection method, system, device and computer readable storage medium
CN114238378A (en) * 2021-12-17 2022-03-25 平安证券股份有限公司 Query method, device, computer equipment and medium based on SQL query engine
CN114356960A (en) * 2021-12-21 2022-04-15 浙江太美医疗科技股份有限公司 Data query method, data query device, computer equipment, storage medium and program product
CN116414778A (en) * 2021-12-29 2023-07-11 宁畅信息产业(北京)有限公司 File integration method, apparatus, computer device, storage medium and program product
CN114547107A (en) * 2022-02-24 2022-05-27 新奥数能科技有限公司 IoT data query method, device, device and storage medium
CN116681382A (en) * 2023-05-16 2023-09-01 智诚计算机辅助设计(深圳)有限公司 Data capture method, system and readable storage medium for bill of materials

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778124A (en) * 2012-10-17 2014-05-07 北大方正集团有限公司 Tree structure query method and device
CN106775770A (en) * 2017-01-16 2017-05-31 兴唐通信科技有限公司 The lookup method of query statement is built based on category information
CN107665228A (en) * 2017-05-10 2018-02-06 平安科技(深圳)有限公司 A kind of related information querying method, terminal and equipment
CN107729396A (en) * 2017-09-20 2018-02-23 上海精数信息科技有限公司 Data Dynamic Query method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7991800B2 (en) * 2006-07-28 2011-08-02 Aprimo Incorporated Object oriented system and method for optimizing the execution of marketing segmentations
US20110093500A1 (en) * 2009-01-21 2011-04-21 Google Inc. Query Optimization
US9928287B2 (en) * 2013-02-24 2018-03-27 Technion Research & Development Foundation Limited Processing query to graph database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778124A (en) * 2012-10-17 2014-05-07 北大方正集团有限公司 Tree structure query method and device
CN106775770A (en) * 2017-01-16 2017-05-31 兴唐通信科技有限公司 The lookup method of query statement is built based on category information
CN107665228A (en) * 2017-05-10 2018-02-06 平安科技(深圳)有限公司 A kind of related information querying method, terminal and equipment
CN107729396A (en) * 2017-09-20 2018-02-23 上海精数信息科技有限公司 Data Dynamic Query method and device

Also Published As

Publication number Publication date
CN109918394A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
CN109918394B (en) Data query method, system, computer device and computer readable storage medium
CN109840257B (en) Database query method, database query device, computer device and readable storage medium
JP2023182708A (en) Automatic dependency analyzer for heterogeneously programmed data processing systems
CA2684822C (en) Data transformation based on a technical design document
CN113961584A (en) Method and device for analyzing field blood relationship, electronic equipment and storage medium
WO2021179722A1 (en) Sql statement parsing method and system, and computer device and storage medium
CN111400387A (en) Conversion method and device for import and export data, terminal equipment and storage medium
US9218411B2 (en) Incremental dynamic document index generation
US9262185B2 (en) Scripted dynamic document generation using dynamic document template scripts
CN110362630B (en) Data management method, device, equipment and computer-readable storage medium
US10380011B2 (en) Method, apparatus, and computer-readable medium for performing functional testing of software
CN111026670B (en) Test case generation method, test case generation device and storage medium
JP2016091560A (en) System and method for reporting multiple objects in enterprise content management
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
Silva et al. Integrating big data into the computing curricula
US9934292B2 (en) Dynamic presentation of a results set by a form-based software application
US20230186212A1 (en) System, method, electronic device, and storage medium for identifying risk event based on social information
CN108460077B (en) Index analysis method, system and computer readable storage medium
CN116541417A (en) Batch data processing method, device, computer equipment and storage medium
CN118069676A (en) Data processing method, electronic device and storage medium
US20240311618A1 (en) Intelligent prompt evaluation and enhancement for generative artificial intelligence processing
CN115701599A (en) A database change method, device, electronic equipment, and storage medium
CN112131851A (en) Target electronic medical record template generation method and device
CN112883695B (en) Method, device, equipment and medium for generating report template and displaying data report

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
GR01 Patent grant
GR01 Patent grant