A configurable data query method, device, system and medium
By using a configurable data query method, and by automating data queries through a visual interface and pre-stored query files, the high cost problem caused by traditional manual interaction is solved, and efficient and secure data query is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2023-03-27
- Publication Date
- 2026-05-05
AI Technical Summary
In the software testing process, the traditional data query interaction process relies on manual interaction, resulting in high manpower and time costs, and making it difficult to achieve efficient data query between different partners.
By using a configurable data query method, the system obtains user input through a visual interface, combines it with pre-stored configurable query files to perform automated data queries, parses and displays the query results, and reduces human intervention.
It enables efficient data retrieval among multiple partners, reduces labor costs, and improves query efficiency and security.
Smart Images

Figure CN116186100B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a configurable data query method, apparatus, system, and medium. Background Technology
[0002] In the software testing process, most software involves data processing collaborations with third parties or across teams. This necessitates checking the data in the other party's database during testing to verify the data's accuracy.
[0003] Traditional data query interaction processes, based on considerations of data confidentiality and security, usually rely on the cooperation of testers from both sides. They check the database according to the queryer's needs and then provide feedback on the results. Such manual interaction queries increase labor and time costs and make it difficult to achieve efficient data queries between different partners. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a configurable data query method, apparatus, system and medium that can be applied to financial technology or other related fields, aiming to improve the data query efficiency among multiple collaborators while ensuring security.
[0005] The technical solution of the present invention is as follows:
[0006] A configurable data query method, the method further comprising:
[0007] In response to the user's actions on the visual interface, obtain the target function and query parameters input by the user;
[0008] Obtain a pre-stored configuration query file for the target function, wherein the configuration query file is used to store the data query logic for the target function;
[0009] The configuration query file is parsed, and data is queried in the corresponding database based on the parsing result of the configuration query file and the query parameters;
[0010] The visualization interface displays the query results returned by the database.
[0011] In one embodiment, the step of obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface includes:
[0012] Several function query cards are displayed on the visual interface;
[0013] The currently selected target function is obtained based on the user's selection operation of the function query card;
[0014] The system displays the parameter input component for the target function and receives the query parameters input by the querying user through the parameter input component.
[0015] In one embodiment, before obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface, the method further includes:
[0016] Display query configuration templates in a visual interface;
[0017] Receive and configure the data query logic and parameter requirements for several functions input by the user through the query configuration template;
[0018] After encapsulating the query logic and parameter requirements of each function, corresponding configurable query files and visual function query cards are generated.
[0019] In one embodiment, after obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface, the method further includes:
[0020] Obtain the permission information of the querying user and confirm whether the querying user has the permission to query the target function.
[0021] In one embodiment, the data query logic includes several query tables and the linked query relationships between the various query tables.
[0022] In one embodiment, parsing the configuration query file and performing a data query in the corresponding database based on the parsing result of the configuration query file and the query parameters includes:
[0023] The configuration query file is parsed to obtain the corresponding SQL statement, which corresponds to the data query logic.
[0024] The SQL statement is used to perform a linked query on the query table in the corresponding database.
[0025] In one embodiment, the configuration query file is an XML file.
[0026] A configurable data query device, comprising:
[0027] The first acquisition module is used to acquire the target function and query parameters input by the query user in response to the operation of the query user on the visual interface;
[0028] The second acquisition module is used to acquire a pre-stored configuration query file of the target function, wherein the configuration query file is used to store the data query logic of the target function;
[0029] The parsing and querying module is used to parse the configuration query file and perform data queries in the corresponding database based on the parsing results of the configuration query file and the query parameters.
[0030] The results display module is used to display the query data results returned by the database on the visualization interface.
[0031] A configurable data query system, the system comprising at least one processor; and,
[0032] A memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores instructions that can be executed by the at least one processor, which enable the at least one processor to perform the configurable data query method described above.
[0034] A non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the above-described configurable data query method.
[0035] Beneficial effects: This invention discloses a configurable data query method, device, system, and medium. Compared with the prior art, the embodiments of this invention utilize configurable query files pre-stored by various partners. Users only need to flexibly select different functions and input query parameters according to their needs to efficiently and conveniently obtain data query results through the pre-configured data query logic. This eliminates the need for human communication between multiple parties, reducing labor costs and improving query efficiency. Attached Figure Description
[0036] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0037] Figure 1 A flowchart of a configurable data query method provided in an embodiment of the present invention;
[0038] Figure 2 Another flowchart of the configurable data query method provided in this embodiment of the invention;
[0039] Figure 3 This is a flowchart of step S100 in the configurable data query method provided in an embodiment of the present invention;
[0040] Figure 4 Another flowchart of the configurable data query method provided in this embodiment of the invention;
[0041] Figure 5 This is a flowchart of step S300 in the configurable data query method provided in an embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram of the functional modules of the configurable data query device provided in an embodiment of the present invention;
[0043] Figure 7 This is a schematic diagram of the hardware structure of a configurable data query system provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments of the invention are described below in conjunction with the accompanying drawings.
[0045] Please see Figure 1 , Figure 1 This is a flowchart of an embodiment of the configurable data query method provided by the present invention. The configurable data query method provided in this embodiment is applied to a system comprising a terminal device, a network, and a server. The network is a medium providing a communication link between the terminal device and the server, and can include various connection types, such as wired, wireless communication links, or fiber optic cables. The operating system on the terminal device can include a handheld device operating system (iPhone operating system, iOS system), Android system, or other operating systems. The terminal device connects to the server through the network to achieve interaction, thereby performing operations such as receiving or sending data. Specifically, it can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, portable computers, and desktop servers. Figure 1 As shown, the method specifically includes the following steps:
[0046] S100: In response to the user's operation on the visual interface, obtain the target function and query parameters input by the user.
[0047] In this embodiment, data query operations between different partners are carried out through a visual interface. The querying user can click, input, and perform other operations on the visual interface provided by the system, so that the query system can obtain the target function and query parameters entered by the current querying user, that is, which function's data the current querying user wants to query for testing and verification, and the query parameters required for that function, thus realizing a convenient visual query operation.
[0048] S200. Obtain the pre-stored configuration query file of the target function, wherein the configuration query file is used to store the data query logic of the target function.
[0049] Based on the target function input by the query user, the system retrieves the pre-stored configuration query file for that target function. This configuration query file is pre-configured and stored in the system by the developer of the target function. It is used to store the data query logic for that target function. The specific data query logic includes several query tables and the linkage query relationships between each query table. That is, the tables involved in implementing the data query of this function. For example, the data query logic includes table a, table b, and table c, as well as the relationships between table a, table b, and table c. The data in table a is relatively independent of table b and table c, and the data in table c needs to be queried through the data in table b, and so on.
[0050] The querying party does not need to consider the data logic of the target function, nor does it need to write database query statements for the target function. The developer of the target function can configure and save the corresponding configuration query file in advance. In multi-party collaboration scenarios, data query and verification do not require extra effort to understand the data logic of functions developed by other teams, further saving time and costs.
[0051] S300. The configuration query file is parsed, and data is queried in the corresponding database based on the parsing result of the configuration query file and the query parameters.
[0052] After obtaining the configuration query file for the target function, the file is parsed. Based on the parsing results and the input query parameters, data is queried from the corresponding database. There can be one or more specific databases, which are associated with the data query logic of the target function. By parsing the file, data can be accurately retrieved from each database without the need for interaction between multiple parties. Specifically, when saving the configuration, the configuration query file is saved in XML (Extensible Markup Language) format. Its concise and easy-to-transmit characteristics can effectively improve the efficiency of acquisition and parsing.
[0053] S400. Display the query data results returned by the database on the visualization interface.
[0054] After querying data from one or more databases, the results returned by the corresponding databases are displayed on a visual interface, enabling intuitive data querying.
[0055] Furthermore, the querying party can verify the data correctness of the target function based on the data query results, thereby realizing data testing of the target function.
[0056] This embodiment utilizes pre-stored configurable query files from various partners. Users only need to flexibly select different functions and input query parameters according to their needs to efficiently and conveniently obtain data query results through the pre-configured data query logic. This eliminates the need for human communication between multiple parties, reducing labor costs and improving query efficiency.
[0057] In one embodiment, see Figure 2 This is another flowchart of the configurable data query method provided in the embodiments of the present invention, such as... Figure 2 As shown, before step S100, the method further includes:
[0058] S500 displays query configuration templates on a visual interface;
[0059] S600: Receive and configure the data query logic and parameter requirements of several functions input by the user through the query configuration template;
[0060] S700 encapsulates the query logic and parameter requirements of each function to generate corresponding configurable query files and visual function query cards.
[0061] In this embodiment, different function developers act as configuration users for data queries. They pre-configure and store the data query logic and external parameter requirements for the corresponding functions in the system. Specifically, after a configuration user initiates a request to add a new query function, a query configuration template is displayed. The configuration user fills in the query configuration template, such as the name and location of the query table, and the query relationship between the various query tables, to obtain the data query logic for the corresponding function. The data query logic and parameter requirements input by the configuration user are encapsulated, and a corresponding XML file is generated and saved. At the same time, a corresponding function query card is also generated on the visual interface, so that the query user can flexibly click on the corresponding function query card to trigger a data query for a certain function. The query method is intuitive and convenient.
[0062] In one embodiment, see Figure 3 This is a flowchart of step S100 in the configurable data query method provided in the embodiments of the present invention, as follows: Figure 3 As shown, step S100 includes:
[0063] S101. Display several function query cards on the visual interface;
[0064] S102. Obtain the currently selected target function based on the user's selection operation of the function query card;
[0065] S103. Display the parameter input component of the target function and receive the query parameters input by the query user through the parameter input component.
[0066] In this embodiment, when a user enters the visualization interface to query data, several function query cards are displayed on the visualization interface based on all currently configured query functions. The user clicks on a function query card to select the corresponding target function. After selecting the target function, a parameter input component for the target function can be displayed on the function query card or in other areas of the visualization interface. Specifically, it can include an input box or a drop-down box, etc., so that the user can input the query parameters required for the target function through the parameter input component and initiate a data query request for the function developed by the partner in a simple and intuitive interactive manner.
[0067] In one embodiment, see Figure 4 This is another flowchart of the configurable data query method provided in the embodiments of the present invention, such as... Figure 4 As shown, after step S100, the method further includes:
[0068] S800: Obtain the permission information of the querying user and confirm whether the querying user has the permission to query the target function.
[0069] In this embodiment, since the data security levels involved between different partners may be different, in order to ensure data security, when a user initiates a data query request for a target function, it is necessary to obtain their permission information. Only after confirming that they have the permission to query the target function will the subsequent data query process continue; otherwise, a query failure message will be output to improve the security of data query.
[0070] In one embodiment, see Figure 5 This is a flowchart of step S300 in the configurable data query method provided in the embodiments of the present invention, as follows: Figure 5 As shown, step S300 includes:
[0071] S301. Parse the configuration query file to obtain the corresponding SQL statement, which corresponds to the data query logic;
[0072] S302. Perform a linked query on the query table in the corresponding database according to the SQL statement.
[0073] In this embodiment, the system parses the obtained configuration query file, i.e., the XML file, and parses it into different SQL statements, i.e., database query statements, according to the logic built into the XML. The system then performs data query operations in the corresponding database using the SQL statements corresponding to the data query logic, thereby achieving efficient data query with low communication costs.
[0074] Another embodiment of the present invention provides a configurable data query device, such as... Figure 6 As shown, device 1 includes:
[0075] The first acquisition module 11 is used to acquire the target function and query parameters input by the query user in response to the operation of the query user on the visual interface;
[0076] The second acquisition module 12 is used to acquire a pre-stored configuration query file of the target function, wherein the configuration query file is used to store the data query logic of the target function;
[0077] The parsing and querying module 13 is used to parse the configuration query file and perform data queries in the corresponding database based on the parsing results of the configuration query file and the query parameters.
[0078] The results display module 14 is used to display the query data results returned by the database on the visualization interface.
[0079] The module referred to in this invention is a series of computer program instruction segments that can perform specific functions. It is more suitable than a program for describing the execution process of configurable data query. For specific implementation methods of each module, please refer to the corresponding method embodiments above, which will not be repeated here.
[0080] In one embodiment, the first acquisition module 11 includes:
[0081] The card display unit is used to display several function query cards on a visual interface;
[0082] The function confirmation unit is used to obtain the currently selected target function based on the user's selection operation on the function query card.
[0083] The parameter acquisition unit is used to display the parameter input component of the target function and receive the query parameters input by the querying user through the parameter input component.
[0084] In one embodiment, the device 1 further includes:
[0085] The template display module is used to display query configuration templates on a visual interface;
[0086] The configuration module is used to receive data query logic and parameter requirements for several functions input by the user through the query configuration template;
[0087] The generation module is used to encapsulate the query logic and parameter requirements of each function to generate corresponding configurable query files and visual function query cards.
[0088] In one embodiment, the device 1 further includes:
[0089] The permission verification module is used to obtain the permission information of the querying user and confirm whether the querying user has the permission to query the target function.
[0090] In one embodiment, the data query logic includes several query tables and the linked query relationships between the various query tables.
[0091] In one embodiment, the parsing query module 13 includes:
[0092] The parsing unit is used to parse the configuration query file to obtain the corresponding SQL statement, which corresponds to the data query logic;
[0093] The query unit is used to perform a linked query on the query table in the corresponding database based on the SQL statement.
[0094] In one embodiment, the configuration query file is an XML file.
[0095] Another embodiment of the present invention provides a configurable data query system, such as Figure 7 As shown, system 10 includes:
[0096] One or more processors 110 and memory 120, Figure 7 The following description uses a processor 110 as an example. The processor 110 and the memory 120 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0097] Processor 110 is used to perform various control logics of system 10, and can be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Furthermore, processor 110 can also be any conventional processor, microprocessor, or state machine. Processor 110 can also be implemented as a combination of computing devices, such as a combination of DSP and microprocessor, multiple microprocessors, one or more microprocessors combined with DSP and / or any other such configuration.
[0098] The memory 120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions corresponding to the configurable data query method in the embodiments of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by running the non-volatile software programs, instructions, and units stored in the memory 120, thereby implementing the configurable data query method in the above method embodiments.
[0099] The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created according to the use of the system 10. Furthermore, the memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include memory remotely located relative to the processor 110, and these remote memories may be connected to the system 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] One or more units are stored in memory 120, and when executed by one or more processors 110, perform the following steps:
[0101] In response to the user's actions on the visual interface, obtain the target function and query parameters input by the user;
[0102] Obtain a pre-stored configuration query file for the target function, wherein the configuration query file is used to store the data query logic for the target function;
[0103] The configuration query file is parsed, and data is queried in the corresponding database based on the parsing result of the configuration query file and the query parameters;
[0104] The visualization interface displays the query results returned by the database.
[0105] In one embodiment, the step of obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface includes:
[0106] Several function query cards are displayed on the visual interface;
[0107] The currently selected target function is obtained based on the user's selection operation of the function query card;
[0108] The system displays the parameter input component for the target function and receives the query parameters input by the querying user through the parameter input component.
[0109] In one embodiment, before obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface, the method further includes:
[0110] Display query configuration templates in a visual interface;
[0111] Receive and configure the data query logic and parameter requirements for several functions input by the user through the query configuration template;
[0112] After encapsulating the query logic and parameter requirements of each function, corresponding configurable query files and visual function query cards are generated.
[0113] In one embodiment, after obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface, the method further includes:
[0114] Obtain the permission information of the querying user and confirm whether the querying user has the permission to query the target function.
[0115] In one embodiment, the data query logic includes several query tables and the linked query relationships between the various query tables.
[0116] In one embodiment, parsing the configuration query file and performing a data query in the corresponding database based on the parsing result of the configuration query file and the query parameters includes:
[0117] The configuration query file is parsed to obtain the corresponding SQL statement, which corresponds to the data query logic.
[0118] The SQL statement is used to perform a linked query on the query table in the corresponding database.
[0119] In one embodiment, the configuration query file is an XML file.
[0120] This invention provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example, to perform the operations described above. Figure 1 Method steps S100 to S400.
[0121] As examples, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory components or memories disclosed in the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0122] In summary, the configurable data query method, apparatus, system, and medium disclosed in this invention involve the following steps: The method responds to user operations on a visual interface by acquiring the target function and query parameters input by the user; acquiring a pre-stored configurable query file for the target function, which stores the data query logic for that function; parsing the configurable query file and performing a data query in the corresponding database based on the parsing results and query parameters; and displaying the query results returned by the database on the visual interface. By utilizing the pre-stored configurable query files from various partners, users only need to flexibly select different functions and input query parameters according to their needs to efficiently and conveniently obtain data query results through the pre-configured data query logic. This eliminates the need for human communication between multiple parties, reducing labor costs and improving query efficiency.
[0123] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The computer program can be stored in a non-volatile, computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, floppy disk, flash memory, optical storage, etc.
[0124] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A configurable data query method, characterized in that, include: Data query operations between different partners can be performed through a visual interface. In response to the operation of the query user on the visual interface, the target function and query parameters input by the query user can be obtained. Obtain a pre-stored configuration query file for the target function. The configuration query file is used to store the data query logic for the target function. The data query logic includes several query tables and the linkage query relationship between each query table. The configuration query file is parsed, and data is queried in the corresponding database based on the parsing result of the configuration query file and the query parameters; The query results returned by the database are displayed on the visualization interface; Before obtaining the target function and query parameters input by the query user in response to the user's operation on the visual interface, the method further includes: Display query configuration templates in a visual interface; The system receives data query logic and parameter requirements for several functions from configuration users who input them through the query configuration template; wherein, the configuration users are different function developers. After encapsulating the query logic and parameter requirements of each function, corresponding configurable query files and visual function query cards are generated. The step of responding to the user's operation on the visual interface and obtaining the target function and query parameters input by the user includes: Based on all currently configured query functions, several function query cards are displayed on the visual interface; The currently selected target function is obtained based on the user's selection operation of the function query card; Display the parameter input component of the target function, and receive the query parameters input by the querying user through the parameter input component to initiate a data query request for the function developed by the partner; After responding to the user's operation on the visual interface and obtaining the target function and query parameters input by the user, the method further includes: Based on the data security levels between different partners, obtain the permission information of the querying user and confirm whether the querying user has the permission to query the target function. The step of parsing the configuration query file and performing data queries in the corresponding database based on the parsing results of the configuration query file and the query parameters includes: The configuration query file is parsed to obtain the corresponding SQL statement, which corresponds to the data query logic. The SQL statement is used to perform a linked query on the query table in the corresponding database.
2. The configurable data query method according to claim 1, characterized in that, The configuration query file is an XML file.
3. A configurable data query device, characterized in that, include: The first acquisition module is used to perform data query operations between different partners through a visual interface, and in response to the operation of the querying user on the visual interface, acquires the target function and query parameters input by the querying user. The second acquisition module is used to acquire a pre-stored configuration query file of the target function. The configuration query file is used to store the data query logic of the target function. The data query logic includes several query tables and the linkage query relationship between the query tables. The parsing and querying module is used to parse the configuration query file and perform data queries in the corresponding database based on the parsing results of the configuration query file and the query parameters. The results display module is used to display the query data results returned by the database on the visualization interface; The template display module is used to display query configuration templates on a visual interface; The configuration module is used to receive data query logic and parameter requirements for several functions input by configuration users through the query configuration template; wherein, the configuration users are different function developers; The generation module is used to encapsulate the query logic and parameter requirements of each function to generate corresponding configurable query files and visual function query cards. The first acquisition module includes: The card display unit is used to display several function query cards on the visual interface based on all currently configured query functions; The function confirmation unit is used to obtain the currently selected target function based on the user's selection operation on the function query card. The parameter acquisition unit is used to display the parameter input component of the target function and receive the query parameters input by the query user through the parameter input component to initiate a data query request for the function developed by the partner. The device further includes: The permission verification module is used to obtain the permission information of the querying user based on the data security level between different partners, and to confirm whether the querying user has the permission to query the target function. The parsing query module includes: The parsing unit is used to parse the configuration query file to obtain the corresponding SQL statement, which corresponds to the data query logic; The query unit is used to perform a linked query on the query table in the corresponding database based on the SQL statement.
4. A configurable data query system, characterized in that, The system includes at least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the configurable data query method according to any one of claims 1-2.
5. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the configurable data query method according to any one of claims 1-2.
Citation Information
Patent Citations
Self-service query method and device thereof for background data
CN102163223A