Movatterモバイル変換


[0]ホーム

URL:


CN112580065A - Data query method and device - Google Patents

Data query method and device
Download PDF

Info

Publication number
CN112580065A
CN112580065ACN201910937007.9ACN201910937007ACN112580065ACN 112580065 ACN112580065 ACN 112580065ACN 201910937007 ACN201910937007 ACN 201910937007ACN 112580065 ACN112580065 ACN 112580065A
Authority
CN
China
Prior art keywords
query
database
display
data
information
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
CN201910937007.9A
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201910937007.9ApriorityCriticalpatent/CN112580065A/en
Publication of CN112580065ApublicationCriticalpatent/CN112580065A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种数据查询方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:接收数据查询请求,提取数据库列表进行显示,响应于对其中一个数据库的访问操作,提取所访问数据库中的表进行显示;响应于对其中一个表的选择操作,提取所选择表中的表单选项进行显示;接收对至少一个表单选项中查询信息的输入,以利用所述查询信息,对与至少一个表单选项相对应的数据进行查询操作,得到查询后的数据并显示。该实施方式针对多个数据库设置有一个查询系统,用户查询数据库中数据时无需频繁点击进入返回操作,即可在一个查询系统中实现对多个数据库的访问,且对各数据库中数据的查询操作方式相同,降低了系统开发成本。

Figure 201910937007

The invention discloses a data query method and device, and relates to the technical field of computers. A specific implementation of the method includes: receiving a data query request, extracting a database list for display, in response to an access operation on one of the databases, extracting a table in the accessed database for display; in response to a selection operation on one of the tables, Extracting form options in the selected table for display; receiving input of query information in at least one form option, to use the query information to perform a query operation on data corresponding to at least one form option, to obtain the queried data and show. In this embodiment, a query system is set for multiple databases, and users can access multiple databases in one query system without frequently clicking to enter the return operation when querying data in the databases, and query data in each database. In the same way, the system development cost is reduced.

Figure 201910937007

Description

Data query method and device
Technical Field
The invention relates to the technical field of computers, in particular to a data query method and a data query device.
Background
After receiving the service query requirement, research and development personnel need to compile a corresponding background query system according to the characteristics of the product database. And setting query items for the user in the system so as to generate query statements for querying according to the query conditions clicked by the user.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
1. a set of background query system needs to be developed separately for each database, so that the service development period is long, and human resources are wasted;
2. background query systems of the databases need to be individually customized, developed and maintained, and when different databases are queried, the databases need to be switched to different query systems for querying, so that the operation is complicated;
3. when the system query function cannot meet the actual requirements of the user, a developer needs to be relied on to modify the codes again to meet the requirements, such as data combination.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data query method and apparatus, which can at least solve the problem in the prior art that a set of background query system needs to be separately developed for each database.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data query method including:
accessing the database, and extracting the table in the accessed database for display;
in response to the selection operation of one table, extracting form options in the selected table for displaying;
and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
Optionally, the extracting the database list for displaying further includes:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
Optionally, the extracting, in response to the access operation on one of the databases, the table in the accessed database for display further includes:
and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
Optionally, the receiving an input of query information in at least one form option, so as to perform a query operation on data corresponding to the at least one form option by using the query information, to obtain and display queried data, further includes:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a data query apparatus including:
the database access module is used for receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
the form option display module is used for responding to the selection operation of one of the tables, and extracting the form options in the selected table for display;
and the data query module is used for receiving input of query information in at least one form option, so as to perform query operation on the data corresponding to the at least one form option by using the query information, obtain and display the queried data.
Optionally, the database access module is further configured to:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
Optionally, the database access module is further configured to: and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
Optionally, the data query module is further configured to:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a data query electronic device.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any of the above data query methods.
To achieve the above object, according to a further aspect of the embodiments of the present invention, there is provided a computer readable medium having a computer program stored thereon, the computer program implementing any one of the above data query methods when executed by a processor.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: only a database which a user has access right is obtained through access right setting; and automatically displaying all operable items in the next step by step according to the selection of the user on the database, the table in the database and the table list option in the table, and finally automatically generating a query statement according to the screening condition of the user for querying to generate a report and finish the data query operation.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a data query method according to an embodiment of the present invention;
FIG. 2 is a flow chart diagram illustrating an alternative data query method according to an embodiment of the invention;
FIG. 3 is a flow diagram illustrating an alternative data query method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main modules of a data query device according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, a main flowchart of a data query method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
s102: in response to the selection operation of one table, extracting form options in the selected table for displaying;
s103: and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
In the above embodiment, the target group to which the present invention is directed is an operator or other data observer who does not know the technology in step S101. The built query system comprises a plurality of databases, such as a platform database, a service database and the like. Subsequent users can select the desired database within the system without having to repeat the enter and return operations.
After the user logs in the query system and clicks the data query operation, the system automatically displays all databases included in the system, for example, names of the databases, business types of the databases and the like are displayed in a list or graph form. The user may perform a click-through operation on the database that the user wants to access to view the tables in the database.
It should be noted that the user can only access one database at a time, and if the current database user finds that the database user does not look like the database user after clicking, the user needs to click the "return operation" to reselect the database for access.
Although the number of databases included in the system is large, in actual operation, there may not be a database that the user wants to view. For the situation, a database file uploading function is arranged in the system, so that when a database which is checked by a user is not available in the system, the user can independently upload and check the database file, and the universality and the content expansibility of the system are improved.
It should be noted that, for the uploaded database file, only local parsing is performed, that is, only the uploading user has the right to view the file, and no record is left when other users cannot see the database file. Furthermore, the uploaded database file is only temporarily stored in the system, and after the user browses/operates the database and closes the system or quits the account, the system automatically executes the cleaning operation on the database.
For step S102, data is stored in tables, each database containing a plurality of tables. After a user clicks and selects one table in the accessed database, the display interface extracts and displays the data contained in the table.
When the data in the table is queried/screened, only part of the data in the table may be displayed finally, so that in order to improve the data display efficiency, the display time of all the data in the table is taken out, and the form options in the table are only displayed before the data is queried. The database is provided with a comment function for marking the meaning of each form option, and when a user moves a mouse to one of the form options, the comment of the form option can be displayed so as to be convenient for the user to understand.
For example, assume that employee information is a database and age information is stored in a basic information table. When a user logs in the query system, a plurality of databases are displayed on the interface, wherein the databases comprise employee information databases. After the user clicks the employee information database, the basic information table is displayed on the interface, and after the user clicks the basic information table, form options such as age, gender and birth date in the table are displayed on the interface.
For step S103, an input box is provided after each form option for the user to input the query/filter condition. For example, "< 30" is entered in the input box of the age option (or field) of the basic information sheet, i.e., staff under the age of 30 is queried.
After the user inputs the Query information and clicks the Query button, the system generates a Query statement, such as Sql (Structured Query Language), based on the Query information and the corresponding form options to screen data in the form options, obtain and display a final Query result, and complete the data Query operation.
Multiple form options may be set in the same table, and a user can input query information to the multiple form options at one time to realize one-time query of data; or, query information can be input for one form option each time, and then a plurality of form options are operated one by one, so that the data is gradually screened.
For the data obtained by query, the user can directly click to view the data, and can also select export to download and view the data, for example, export the data into an Excel table.
The method provided by the embodiment is provided with the query system aiming at the databases, when a user queries the data in the databases, the user can access the databases in the query system without frequently clicking to enter the return operation, the operation mode of each database is universal, the system development cost is reduced, and meanwhile, the human resources are saved.
Referring to fig. 2, a schematic flow chart of an alternative data query method according to an embodiment of the present invention is shown, including the following steps:
s201: receiving a data query request, receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
s202: extracting the access authority information as a database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying;
s203: responding to the access operation of one database, acquiring the selection authority information of the roles to each table in the accessed database, and extracting the selection authority information as the table allowing selection for display;
s204: responding to the selection operation of one table, acquiring the viewing authority information of the role on each form option in the selected table, and extracting the viewing authority information as the form option allowed to be viewed;
s205: and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
In the above embodiment, for step S205, refer to the description of step S103 shown in fig. 1, and no further description is provided herein.
In the above embodiment, for step S201, the authority management generally refers to that, according to the security rule or security policy configured by the system, the user can access and can only access an authorized resource (e.g. a database). Rights management occurs in almost any system, especially systems that require a user to log in, such as employee information systems, point of burial systems, order systems, reporting systems, and the like.
In order to ensure the safety of database access in the system, different users have different access rights for the database with access right setting in the system. Some databases may allow access by all users, while some may allow access only by a particular user or users.
For the multi-user and multi-authority condition, a certain storage space is usually set in the query system to store access authority information of different users to different databases, and the access authority information is embodied by user login accounts. The account may be a user name and a password, or an account such as a mobile phone number, a mailbox account, a social account and the like which has been applied for registration or authorized login in the query system.
In order to facilitate the management of the access authority of the user account to each database in the system, the invention sets a role for each account. E.g., a group owner role, an administrator role, having access to all databases; and the assembly role, the test role, the maintenance role and the like only have access right to part of the database.
The system is preset with a role set, and when a user applies/registers an account, the user can perform role self-selection, and also can submit a role modification request in the subsequent use process so as to perform role adjustment according to the modified role. Therefore, after the user logs in the account and clicks the data query operation, the system determines the role pre-assigned to the account.
For step S202, the system presets access right information for each role for each database, including both permission access and prohibition access. The permission of access may be permission of browsing, selecting, viewing and the like on the table/data in the database, and the corresponding prohibition of access is permission of prohibition of browsing, selecting, viewing and the like on the table/data in the database.
Further, in order to save the occupation of the system storage space by the access right management information, different authority values may be set for the two types of access right information, for example, the authority value for prohibiting access is 0, and the authority value for allowing access is 1 or a value between 0 and 1.
Therefore, after the system determines the role of the current account, the system determines the database information which is allowed to be accessed according to the access authority information of the role to each database, and then the database information is combined and displayed in a list/icon form.
For step S203, the table is stored in the database, and when the user clicks the accessed database, the system automatically displays all tables in the database.
Considering the access rights information of a role to a database, the rights allowed to be selected are not necessarily exactly the same for each table in the same database. Therefore, the tables in the database are also screened based on the selection authority information of the role tables, so that only the tables with the selection authority are displayed.
It should be noted that, the selection authority information in the table in the database may be set in the same manner as or different from the access authority information in the database, but the operation principle is the same, and is specifically set by the operator.
For step S204, the data is stored in a table, and when the user clicks on the selected table, the system displays the form options in the table.
Like the access authority information and the selection authority information, the form options in the form are also provided with the viewing authority information so as to display different form options for different authority users, and the operation that the user needs to manually slide the screen due to excessive form options is reduced, so that the subsequent data query efficiency is improved. Therefore, the form options in the table need to be screened based on the viewing permission information, so that only the form options with viewing permission are displayed.
According to the method provided by the embodiment, the user can view different interfaces through setting the access authority of the user to the database, the table in the database and the menu option in the table. When the number of the options of the database, the table and the form in the system is large, the filtering can be performed in the mode, the time for searching the target by manually sliding the screen by a user is reduced, and meanwhile, the practicability and the data safety of the system are improved.
Referring to fig. 3, a schematic flow chart of another alternative data query method according to the embodiment of the present invention is shown, which includes the following steps:
s301: receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
s302: in response to the selection operation of one table, extracting form options in the selected table for displaying;
s303: receiving input of query information in at least one form option, and generating a query statement according to the identifier of the table, the form option and the query information;
s304: responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
s305: in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
s306: receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
s307: and querying the data in the table by using the query statement and the first query statement to obtain queried data and displaying the queried data.
In the above embodiment, for steps S301 and S302, reference may be made to the descriptions shown in fig. 1 and fig. 2, and details are not repeated here.
In the above embodiment, in steps S303 to S306, in the present invention, the user can access only one database and select one table in the database per operation.
In order to improve the comprehensiveness of the queried data, the invention responds to the selection operation of a user on one table in the database, displays the form options in the table, and simultaneously displays the association table with the table for the user to select, for example, displays the name of the association table in a list form.
The determination of the association table is made dependent on the identity of the accessed table. The identifier here may be a foreign key of the table. A table has only one primary key, but may have multiple foreign keys. The external key of the table is a main key of another table, and the external key can be repeated or null value and is used for establishing association relation with other tables. In addition, the foreign key is mainly used for controlling the integrity of data in the database, and when the data in one table is operated, the data in the table or a plurality of tables related to the foreign key can be changed simultaneously.
For example, the employee information is a database, the employee age information is stored in a basic information table, the social security information is separately stored in a social security information table, the public deposit information is separately stored in a public deposit information table, and the basic information table is associated with the social security information table and the public deposit information table. After the user selects the basic information table in the employee information database, if the operation of 'associated query' is clicked, the system displays the names of the social security information table and the public accumulation fund information table in a list or chart form.
Multiple association tables may be associated with the same table, but some users may not. The user can click on a part of the selected association table, and then input specific query information (namely, first query information) in the form option (namely, the first form option) of the selected association table. For example, the social security information table related to the basic information table inputs "> 5" in the input box after the age option/field of the social security information table, which means that employee information of the social security payment age of more than 5 years is extracted.
For step S307, after all the conditions are input, the query button is clicked to generate a query statement according to the query information input in each table (including the association table) selected by the user for data query, thereby completing the query operation.
For example, "< 30" is entered in the input box after the age option of the basic information table, then the associated social security information table is clicked, and "> 5" is entered in the input box after the age option of the social security information table; then clicking the associated accumulation fund information table, and inputting '3' in an input box behind the age options of the accumulation fund information table. The staff information under 30 years which meets the requirements that all social insurance is paid for more than 5 years and the public accumulation fund is paid for more than 3 years in the basic information table can be obtained by clicking the query button.
According to the method provided by the embodiment, all operable items in the next step are automatically displayed step by step according to the selection of the user on the database, the table in the database and the table menu option in the table; increasing associated query options to realize the function of data screening on multiple tables at one time; and finally, automatically generating query statements according to the screening conditions of the user for query, generating reports of the obtained data, and finishing the data query operation.
Referring to fig. 4, a schematic diagram of main modules of adata query apparatus 400 according to an embodiment of the present invention is shown, including:
thedatabase access module 401 is configured to receive a data query request, extract a database list for display, and extract a table in an accessed database for display in response to an access operation on one of the databases;
a formoption display module 402, configured to, in response to a selection operation on one of the tables, extract and display a form option in the selected table;
thedata query module 403 is configured to receive an input of query information in at least one form option, perform a query operation on data corresponding to the at least one form option by using the query information, obtain queried data, and display the queried data.
In the apparatus for implementing the present invention, thedatabase access module 401 is further configured to:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
In the apparatus for implementing the present invention, thedatabase access module 401 is further configured to: and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
In the implementation apparatus of the present invention, thedata query module 403 is further configured to:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.
Fig. 5 illustrates anexemplary system architecture 500 to which embodiments of the invention may be applied.
As shown in fig. 5, thesystem architecture 500 may includeterminal devices 501, 502, 503, anetwork 504, and a server 505 (by way of example only). Thenetwork 504 serves to provide a medium for communication links between theterminal devices 501, 502, 503 and theserver 505.Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use theterminal devices 501, 502, 503 to interact with aserver 505 over anetwork 504 to receive or send messages or the like. Various communication client applications may be installed on theterminal devices 501, 502, 503.
Theterminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Theserver 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using theterminal devices 501, 502, 503.
It should be noted that the method provided by the embodiment of the present invention is generally executed by theserver 505, and accordingly, the apparatus is generally disposed in theserver 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of acomputer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, thecomputer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from astorage section 608 into a Random Access Memory (RAM) 603. In theRAM 603, various programs and data necessary for the operation of thesystem 600 are also stored. TheCPU 601,ROM 602, andRAM 603 are connected to each other via abus 604. An input/output (I/O)interface 605 is also connected tobus 604.
The following components are connected to the I/O interface 605: aninput portion 606 including a keyboard, a mouse, and the like; anoutput portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; astorage section 608 including a hard disk and the like; and acommunication section 609 including a network interface card such as a LAN card, a modem, or the like. Thecommunication section 609 performs communication processing via a network such as the internet. Thedriver 610 is also connected to the I/O interface 605 as needed. Aremovable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on thedrive 610 as necessary, so that a computer program read out therefrom is mounted in thestorage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through thecommunication section 609, and/or installed from theremovable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can 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 invention, 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 the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a database access module, a form option display module and a data query module. The names of these modules do not form a limitation to the module itself in some cases, for example, the data query module may also be described as a "module that queries data corresponding to a menu option".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
in response to the selection operation of one table, extracting form options in the selected table for displaying;
and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
According to the technical scheme of the embodiment of the invention, only the database which the user has the authority to access is obtained through the access authority setting; and automatically displaying all operable items in the next step by step according to the selection of the user on the database, the table in the database and the table list option in the table, and finally automatically generating a query statement according to the screening condition of the user for query, generating the obtained data into the table list and finishing the data query operation.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种数据查询方法,其特征在于,包括:1. a data query method, is characterized in that, comprises:接收数据查询请求,提取数据库列表进行显示,响应于对其中一个数据库的访问操作,提取所访问数据库中的表进行显示;Receive a data query request, extract a database list for display, and in response to an access operation to one of the databases, extract a table in the accessed database for display;响应于对其中一个表的选择操作,提取所选择表中的表单选项进行显示;In response to a selection operation on one of the tables, extract the form options in the selected table for display;接收对至少一个表单选项中查询信息的输入,以利用所述查询信息,对与所述至少一个表单选项相对应的数据进行查询操作,得到查询后的数据并显示。The input of query information in at least one form option is received, and a query operation is performed on the data corresponding to the at least one form option by using the query information, and the queried data is obtained and displayed.2.根据权利要求1所述的方法,其特征在于,所述提取数据库列表进行显示,还包括:2. The method according to claim 1, wherein the extracting a database list for display further comprises:接收账号输入,确定预先赋予所述账号的角色,获取所述角色对所述数据库列表中各数据库的访问权限信息;receiving an account input, determining a role pre-assigned to the account, and acquiring access authority information of the role to each database in the database list;提取访问权限信息为允许访问的数据库,组合所提取的数据库生成第一数据库列表进行显示。The access authority information is extracted to allow access to the databases, and the extracted databases are combined to generate a first database list for display.3.根据权利要求1所述的方法,其特征在于,所述响应于对其中一个数据库的访问操作,提取所访问数据库中的表进行显示,还包括:3. The method according to claim 1, wherein, in response to an access operation to one of the databases, extracting a table in the accessed database for display, further comprising:接收数据库文件的上传请求,解析所述数据库文件,以对所述数据库文件中的表进行显示。An upload request for a database file is received, and the database file is parsed to display the table in the database file.4.根据权利要求1所述的方法,其特征在于,所述接收对至少一个表单选项中查询信息的输入,以利用所述查询信息,对与所述至少一个表单选项相对应的数据进行查询操作,得到查询后的数据并显示,还包括:4. The method of claim 1, wherein the receiving input of query information in at least one form option is used to query data corresponding to the at least one form option using the query information operation, get the queried data and display it, and also include:响应于对所述表的关联查询操作,根据所述表的外键信息,确定与所述表具有关联关系的关联表列表;In response to the associated query operation on the table, according to the foreign key information of the table, determine a list of associated tables that have an associated relationship with the table;响应于对至少一个关联表的选择操作,提取所述至少一个关联表中的第一表单选项进行显示;In response to a selection operation on at least one association table, extracting a first form option in the at least one association table for display;接收对至少一个第一表单选项中第一查询信息的输入,根据所述至少一个关联表的标识、所述至少一个第一表单选项和所述第一查询信息,生成第一查询语句;receiving input of first query information in at least one first form option, and generating a first query statement according to the identifier of the at least one association table, the at least one first form option, and the first query information;利用查询语句和所述第一查询语句,对所述表中的数据进行查询,得到查询后的数据并显示;其中,所述查询语句为根据所述表的标识、所述表单选项和所述查询信息所生成。Using the query statement and the first query statement, query the data in the table to obtain the queried data and display it; wherein the query statement is based on the identifier of the table, the form options and the Generated by query information.5.一种数据查询装置,其特征在于,包括:5. A data query device, characterized in that, comprising:数据库访问模块,用于接收数据查询请求,提取数据库列表进行显示,响应于对其中一个数据库的访问操作,提取所访问数据库中的表进行显示;The database access module is used to receive a data query request, extract a database list for display, and in response to an access operation to one of the databases, extract a table in the accessed database for display;表单选项显示模块,用于响应于对其中一个表的选择操作,提取所选择表中的表单选项进行显示;The form option display module is used to extract the form options in the selected table for display in response to the selection operation on one of the tables;数据查询模块,用于接收对至少一个表单选项中查询信息的输入,以利用所述查询信息,对与所述至少一个表单选项相对应的数据进行查询操作,得到查询后的数据并显示。The data query module is configured to receive input of query information in at least one form option, and use the query information to perform a query operation on the data corresponding to the at least one form option to obtain and display the queried data.6.根据权利要求5所述的装置,其特征在于,所述数据库访问模块,还用于:6. The device according to claim 5, wherein the database access module is further used for:接收账号输入,确定预先赋予所述账号的角色,获取所述角色对所述数据库列表中各数据库的访问权限信息;receiving an account input, determining a role pre-assigned to the account, and acquiring access authority information of the role to each database in the database list;提取访问权限信息为允许访问的数据库,组合所提取的数据库生成第一数据库列表进行显示。The access authority information is extracted to allow access to the databases, and the extracted databases are combined to generate a first database list for display.7.根据权利要求5所述的装置,其特征在于,所述数据库访问模块,还用于:7. The device according to claim 5, wherein the database access module is further used for:接收数据库文件的上传请求,解析所述数据库文件,以对所述数据库文件中的表进行显示。An upload request for a database file is received, and the database file is parsed to display the table in the database file.8.根据权利要求5所述的装置,其特征在于,所述数据查询模块,还用于:8. The device according to claim 5, wherein the data query module is further used for:响应于对所述表的关联查询操作,根据所述表的外键信息,确定与所述表具有关联关系的关联表列表;In response to the associated query operation on the table, according to the foreign key information of the table, determine a list of associated tables that have an associated relationship with the table;响应于对至少一个关联表的选择操作,提取所述至少一个关联表中的第一表单选项进行显示;In response to a selection operation on at least one association table, extracting a first form option in the at least one association table for display;接收对至少一个第一表单选项中第一查询信息的输入,根据所述至少一个关联表的标识、所述至少一个第一表单选项和所述第一查询信息,生成第一查询语句;receiving input of first query information in at least one first form option, and generating a first query statement according to the identifier of the at least one association table, the at least one first form option, and the first query information;利用查询语句和所述第一查询语句,对所述表中的数据进行查询,得到查询后的数据并显示;其中,所述查询语句为根据所述表的标识、所述表单选项和所述查询信息所生成。Using the query statement and the first query statement, query the data in the table to obtain the queried data and display it; wherein the query statement is based on the identifier of the table, the form options and the Generated by query information.9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that, comprising:一个或多个处理器;one or more processors;存储装置,用于存储一个或多个程序,storage means for storing one or more programs,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-4中任一所述的方法。The 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-4.10.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-4中任一所述的方法。10. A computer-readable medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-4 is implemented.
CN201910937007.9A2019-09-292019-09-29Data query method and devicePendingCN112580065A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910937007.9ACN112580065A (en)2019-09-292019-09-29Data query method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910937007.9ACN112580065A (en)2019-09-292019-09-29Data query method and device

Publications (1)

Publication NumberPublication Date
CN112580065Atrue CN112580065A (en)2021-03-30

Family

ID=75111173

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910937007.9APendingCN112580065A (en)2019-09-292019-09-29Data query method and device

Country Status (1)

CountryLink
CN (1)CN112580065A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113051355A (en)*2021-04-162021-06-29湖南快乐阳光互动娱乐传媒有限公司Receipt generation method and device, computer equipment and storage medium
CN113177070A (en)*2021-05-172021-07-27中移智行网络科技有限公司Information query method, device and related equipment
CN116226811A (en)*2023-01-162023-06-06建信金融科技有限责任公司Method, device, equipment and computer storage medium for data acquisition
CN116644089A (en)*2023-06-162023-08-25中国银行股份有限公司 Query statement generation method, device, equipment and storage medium
CN117216352A (en)*2023-09-122023-12-12中国联合网络通信集团有限公司Form-based data query method, device, equipment and storage medium
CN116226811B (en)*2023-01-162025-10-10建信金融科技有限责任公司 Data acquisition method, device, equipment and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070282869A1 (en)*2006-06-052007-12-06Microsoft CorporationAutomatically generating web forms from database schema
CN101694637A (en)*2009-11-062010-04-14金蝶软件(中国)有限公司Method and system for restoring database
CN109144997A (en)*2018-06-112019-01-04玖富金科控股集团有限责任公司Data correlation method, device and storage medium
CN109409119A (en)*2017-08-172019-03-01北京京东尚科信息技术有限公司Data manipulation method and device
CN109840257A (en)*2018-12-152019-06-04中国平安人寿保险股份有限公司Data base query method, device, computer installation and readable storage medium storing program for executing
CN109918394A (en)*2019-01-232019-06-21中国平安人寿保险股份有限公司Data query method, system, computer installation and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070282869A1 (en)*2006-06-052007-12-06Microsoft CorporationAutomatically generating web forms from database schema
CN101694637A (en)*2009-11-062010-04-14金蝶软件(中国)有限公司Method and system for restoring database
CN109409119A (en)*2017-08-172019-03-01北京京东尚科信息技术有限公司Data manipulation method and device
CN109144997A (en)*2018-06-112019-01-04玖富金科控股集团有限责任公司Data correlation method, device and storage medium
CN109840257A (en)*2018-12-152019-06-04中国平安人寿保险股份有限公司Data base query method, device, computer installation and readable storage medium storing program for executing
CN109918394A (en)*2019-01-232019-06-21中国平安人寿保险股份有限公司Data query method, system, computer installation and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
文家淼 等: "数据库系统原理与应用", vol. 1, 30 November 2002, 冶金工业出版社, pages: 201 - 202*

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113051355A (en)*2021-04-162021-06-29湖南快乐阳光互动娱乐传媒有限公司Receipt generation method and device, computer equipment and storage medium
CN113177070A (en)*2021-05-172021-07-27中移智行网络科技有限公司Information query method, device and related equipment
CN113177070B (en)*2021-05-172022-08-12中移智行网络科技有限公司 Information query method, device and related equipment
CN116226811A (en)*2023-01-162023-06-06建信金融科技有限责任公司Method, device, equipment and computer storage medium for data acquisition
CN116226811B (en)*2023-01-162025-10-10建信金融科技有限责任公司 Data acquisition method, device, equipment and computer storage medium
CN116644089A (en)*2023-06-162023-08-25中国银行股份有限公司 Query statement generation method, device, equipment and storage medium
CN117216352A (en)*2023-09-122023-12-12中国联合网络通信集团有限公司Form-based data query method, device, equipment and storage medium
CN117216352B (en)*2023-09-122025-08-26中国联合网络通信集团有限公司 Form-based data query method, device, equipment, and storage medium

Similar Documents

PublicationPublication DateTitle
US9729542B2 (en)Compartmentalizing application distribution for disparate electronic devices
US9665654B2 (en)Secure connections in an interactive analytic visualization infrastructure
US20170206684A1 (en)Intelligent container for analytic visualizations
US10083488B2 (en)Purchasing contact information from an electronically displayed map
CN112580065A (en)Data query method and device
US10104086B2 (en)Techniques for fine grained protection of resources in an access management environment
US20230370467A1 (en)Apparatuses, methods, and computer program products for centralized access permissions management of a plurality of application instances
US9971803B2 (en)Method and system for embedding third party data into a SaaS business platform
CN109522751B (en)Access right control method and device, electronic equipment and computer readable medium
CN113361838A (en)Business wind control method and device, electronic equipment and storage medium
CN113282591B (en)Authority filtering method, authority filtering device, computer equipment and storage medium
US20140173693A1 (en)Cookie Optimization
US11741257B2 (en)Systems and methods for obtaining anonymized information derived from data obtained from external data providers
US20200210615A1 (en)Policy based lifecycle management of personal information
US20190227857A1 (en)Smart clipboard for secure data transfer
CN115587575A (en)Data table creation method, target data query method, device and equipment
CN117170784A (en)Menu and page rendering method and device thereof and electronic equipment
US11966770B2 (en)Collaboration across isolated virtual environments
US20160322021A1 (en)Creation of interactive composite analytic visualizations
WO2022216881A1 (en)Enhancing user identification with privacy protection across web servers
US20220060470A1 (en)Expedited Authorization and Access Management
CN112182080A (en) Data integration system and data processing method based on data integration system
CN113297087B (en) Test methods and equipment
US20070271229A1 (en)System and method for data searching among multiple enterprise applications
CN113051477B (en) Content recommendation method, device, electronic device and medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp