Dynamic cross-table ad hoc query method, system and storage medium

By generating subtable information views and automatically converting query conditions, dynamic splicing query syntax, the complexity of improper query after database subtitles is solved, efficient query of historical and real-time data is achieved, and query efficiency and coverage are improved. .

CN118503299BActive Publication Date: 2024-11-01ZOE SOFT CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410977018.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-01
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

After the database is divided into databases and tables, the ad-hoc query on the front-end becomes complicated, and data needs to be reconverged to facilitate querying, resulting in primary key conflicts, real-time business queries lagging, and large table queries are inefficient.

Method used

By generating a subtable information view, automatically establishing subtable information, automatically converting query conditions based on the improper query parameters passed in by the front-end, dynamically splicing query syntax, and positioning the specific set of table names of the query to realize dynamic query of historical data and real-time data.

Benefits of technology

The historical and real-time data can be queried without re-aggregating data, which improves query efficiency and data coverage, and meets the accuracy, convenience and real-time requirements of improvised queries after database and table division.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503299B_ABST
    Figure CN118503299B_ABST
Patent Text Reader

Abstract

The present invention provides a dynamic cross-table ad hoc query method, system and storage medium. After the database is processed, a table information view is created to automatically establish table information. According to the ad hoc query parameters passed in from the front end, the query conditions are automatically converted, the specific table name set for the query is located, and the complete query condition statement is dynamically reassembled to execute the query and obtain the result. Since the table information view records all table information corresponding to the business data, the business data includes historical data and real-time data, and the returned table name set is dynamically generated according to the query conditions, the table or table set information corresponding to the real-time data and / or historical data can be returned according to the query scope. Therefore, the present invention can query both historical data and real-time data, effectively improve the query efficiency and the data range covered, and meet the accuracy, convenience and real-time requirements of ad hoc queries of sub-tables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of data processing, and in particular relates to a dynamic cross-table ad hoc query method, system and storage medium. Background Art

[0002] In relational database applications, in order to cope with the pressure of growing business data on the database, historical data needs to be migrated, that is, sharding. When the database is sharded, the front-end ad hoc query of business data becomes complicated. There are usually two ways to do this: one is to limit the query scope, for example, only allow queries for records in the most recent year; the other is to re-aggregate and merge the data of all shards into the same table (query library or analysis library) for easy query. When re-aggregating the sharded data for ad hoc query, the following problems will be faced:

[0003] The data aggregation process needs to additionally handle the primary key conflicts after aggregation caused by the sharding of databases and tables; since data re-aggregation is a post-processing, there is a certain lag in real-time business queries; (3) the query efficiency of large tables after data re-aggregation is low. Summary of the invention

[0004] The purpose of the present invention is to provide a dynamic cross-table ad hoc query method, system and storage medium. After the database is sharded, there is no need to re-aggregate the data for ad hoc query. Both historical data and real-time data can be queried, which can effectively improve the query efficiency and the data coverage range.

[0005] The present invention provides a dynamic cross-table ad hoc query method, comprising the following steps:

[0006] Step 1: After the database is divided into sub-libraries and sub-tables, the monitoring program is triggered to generate a sub-table information view that records the business data range of each sub-table;

[0007] The sub-table information view is a pre-created entity table, with a mapping dictionary of sub-table field names and sub-table information view field names, which is used to determine a specific sub-library sub-table or sub-table set in the query of the sub-table field name and parameter value converted by the parameter conversion module to reversely query the sub-table information view. The sub-table information view records all sub-table information corresponding to the business data, which includes historical data and real-time data, including metadata information and business data range stored in the table. The metadata information is a subset of the metadata database, including library connection information and sub-table table names. The business data range allows setting as required. The metadata database refers to the metadata information of all tables in the entire database;

[0008] The content of the sub-table information view is generated by the monitoring program, and the sub-table information view data can be added, deleted or modified due to human or sub-table events. When a new sub-table is added or the table name of an existing sub-table is deleted or renamed, the addition, deletion or modification event is triggered; when the table name is renamed, the monitoring program scans the metadata database to delete the record information of the original table name and inserts the record information of the new table name; each time the database is sub-divided, the monitoring program scans the metadata database to automatically insert the record information of the new table name;

[0009] The monitoring program consists of scanning events and calling stored procedures. It updates the metadata information in the sub-table information view by scanning the difference between the metadata database and the sub-table information view; traverses each record in the sub-table information view, queries the corresponding sub-table to obtain business data and updates it to the field value domain of the sub-table information view;

[0010] Step 2: The front-end inputs the ad hoc query parameters, which include parameter names and parameter values, and passes them to the back-end parameter conversion module for parameter conversion. The parameter conversion module maps the input parameter names to sub-table field names by querying the parameter name and field name mapping dictionary. The parameter value determines the value range of the field. The sub-table field name combined with the corresponding parameter value determines the data range of the query;

[0011] Step 3: Generate query condition statements by combining table field names and parameter values ​​with field query logic;

[0012] Step 4: According to the parameter value obtained after parameter conversion and the sub-table field name, the sub-table field name in the sub-table information view and the sub-table information view field name mapping dictionary are searched to obtain the intersection field; then, according to the intersection field, the intersection of the field value range in the sub-table information view and the parameter value obtained by the parameter conversion module is obtained to query and obtain the table name or table name set of the sub-library and sub-table;

[0013] Step 5: loop through the table names or table name sets of the sub-databases and sub-tables obtained by querying in step 4, and combine the database information and table information of each table with the query condition statement generated in step 3 to obtain the query syntax of a single table; then combine the query syntaxes of each single table to obtain the final query condition statement text;

[0014] Step 6: Execute the query according to the assembled query condition statement text to obtain the query result.

[0015] The parameter values ​​transmitted from the front end to the back end are encrypted and decrypted. That is, when the front end queries, the parameter values ​​passed in are encrypted by the encryption function and then transmitted to the parameter conversion module of the back end, and then decrypted by the decryption function to obtain the passed in parameter values.

[0016] The field query logic refers to:

[0017] If the parameter value is list, the corresponding field query logic is "in";

[0018] If the parameter value is a single value, the corresponding field query logic is "=";

[0019] If the parameter value is a single value ending with *, the corresponding field query logic is "like";

[0020] If the parameter value is a range, the corresponding field query logic is ">= AND<=".

[0021] A dynamic cross-sub-table ad hoc query system comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned dynamic cross-sub-table ad hoc query method is implemented.

[0022] A computer storage medium stores a computer program, which implements the above-mentioned dynamic cross-table ad hoc query method when executed by a processor.

[0023] According to the technical solution of the present invention, after the database is processed by sharding, the sharding information view is created to automatically establish the sharding information; according to the ad hoc query parameters passed in by the front end, the query conditions are automatically converted, the specific table name set of the query is located, the complete query syntax is dynamically reassembled, and the query is executed and the result is obtained according to the reassembled query syntax. Since the sharding information view records all the sharding information corresponding to the business data, the business data includes historical data and real-time data, and the returned table name set is dynamically generated according to the query conditions, it means that if the query range is the historical data range, the sharding table or sharding table set information corresponding to the historical data is returned, and if the query range is the real-time data of the business system, the table information corresponding to the real-time data is returned; if the query range covers both historical data and real-time data, the returned table set contains both the sharding table or sharding table set information corresponding to the historical data and the table information corresponding to the real-time data of the business system. Therefore, the present invention can query both historical data and real-time data, effectively improve the query efficiency and the data range covered, and meet the accuracy, convenience and real-time requirements of ad hoc query of sharding. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of the present invention;

[0025] Figure 2 It is a schematic diagram of the sub-table information view in the present invention;

[0026] Figure 3 It is a flow chart of the present invention for reversing the sub-table information view according to the parameter value after parameter conversion and the sub-table field name;

[0027] Figure 4 A schematic diagram of a mapping dictionary between sub-table field names and sub-table information view field names in the present invention;

[0028] Figure 5 This is an example of a query condition statement result obtained by assembling and splicing a table name or a set of table names in an embodiment of the present invention;

[0029] Figure 6 The figure is a schematic block diagram of the dynamic cross-table ad hoc query system of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0033] Embodiment 1

[0034] Embodiment 1 of the present invention provides a dynamic cross-table ad hoc query method, such as Figure 1 As shown, the following steps are included:

[0035] Step 1: After the database is divided into sub-libraries and sub-tables, the monitoring program is triggered to generate a sub-table information view that records the business data range of each sub-table;

[0036] The split table information view split_tables is a pre-created entity table, with a mapping dictionary of split table field names and split table information view field names, which is used to determine the specific sub-library sub-table or sub-table set in the query of the split table information view by reversely checking the sub-table field names and parameter values ​​converted by the parameter conversion module. The sub-table information view records all sub-table information corresponding to the business data, and the business data includes historical data and real-time data, including metadata information and business data range stored in the table. The metadata information is a subset of the metadata database, including library connection information and sub-table table names. The business data range can be set as required, for example, it refers to the start time and end time of the business time; the metadata database refers to the metadata information of all tables in the entire database, such as the information_schema database provided by MySQL.

[0037] like Figure 2 As shown, it is a specific embodiment of the sub-table information view, including the database name where the business data is stored, the sub-table name corresponding to the business data, the table creation time, the table business attributes, the consultation start time, the consultation end time, the consultation card prefix, etc.

[0038] The content of the sub-table information view is generated by the monitoring program. The data in the table in the database can be added, deleted or modified due to human or sub-table and sub-library events. The table name of an existing sub-table can be renamed or a new sub-table can be created. When renaming a table name, the monitoring program scans the metadata database to delete the record information of the original table name and inserts the record information of the new table name. Each time a sub-library and table are divided, the monitoring program scans the metadata database to automatically insert the record information of the new table name.

[0039] The monitoring program consists of a scanning event task_split_table_info and a call to a stored procedure sp_split_table_info. The monitoring program updates the metadata information in the split table information view split_tables by scanning the difference between the metadata database information_schema.TABLES and the split table information view split_tables; traverses each record in the split table information view split_tables, queries the corresponding split table to obtain business data and updates it to the field value domain of the split table information view split_tables; in order to reduce database IO and minimize the lag of queries, the scanning event execution frequency of the monitoring program is once every 5 minutes.

[0040] Step 2: The front-end inputs the ad hoc query parameters, which include parameter names and parameter values, and passes them to the back-end parameter conversion module for parameter conversion. The parameter conversion module maps the input parameter names to sub-table field names by querying the parameter name and field name mapping dictionary. The parameter value determines the value range of the field. The sub-table field name combined with the corresponding parameter value determines the data range of the query;

[0041] In order to improve security, the parameter values ​​transmitted from the front end to the back end are encrypted and decrypted, that is, when the front end queries, the incoming parameter values ​​are encrypted by the encryption function and transmitted to the parameter conversion module of the back end, and then decrypted by the decryption function to obtain the incoming parameter values; the present invention adopts the encryption function FR_ENCRYPT and the decryption function FR_DECRYPT defined by symmetric encryption.

[0042] Step 3: Generate query condition statements by combining table field names and parameter values ​​with field query logic;

[0043] The field query logic refers to:

[0044] If the parameter value is list, the corresponding field query logic is "in";

[0045] If the parameter value is a single value, the corresponding field query logic is "=";

[0046] If the parameter value is a single value ending with *, the corresponding field query logic is "like";

[0047] If the parameter value is a range, the corresponding field query logic is ">= AND<=".

[0048] For example, when the parameter value is list, the query condition statement is: where field name in parameter value;

[0049] Step 4: At the same time, according to the parameter value obtained after parameter conversion and the sub-table field name, the split table information view split_tables is queried to obtain the table name or table name set of the sub-library and sub-table actually queried;

[0050] like Figure 3 and Figure 4 As shown, according to the parameter value obtained after parameter conversion and the sub-table field name, the sub-table field name and the sub-table information view field name mapping dictionary are reversely searched to obtain the intersection field; then, according to the intersection field, the intersection of the field value range in the sub-table information view split_tables and the parameter value obtained by the parameter conversion module is obtained to query and obtain the table name or table name set of the sub-library and sub-table;

[0051] Step 5: According to the query condition statement generated in step 3 and the table name or table name set of the sub-library and sub-table obtained by querying in step 4, dynamically assemble and reassemble to obtain the query condition statement text;

[0052] Loop through the table names or table name sets of the sub-databases and sub-tables queried in step 4, and combine the database information and table information of each table with the query condition statement generated in step 3 to obtain the query syntax of a single table; then combine the query syntaxes of each single table to obtain the final query condition statement text;

[0053] Step 6: Execute the query according to the assembled query condition statement text to obtain the query result.

[0054] In order to make the above technical solution easier to understand, it is explained in a specific scenario below.

[0055] Specific scenario: An individual uses the app to query medical records for a certain period of time;

[0056] Split table information view (split_tables): medical records are stored in separate tables according to the first digit of the individual medical card number and the year of medical treatment;

[0057] (1) Ad hoc query parameters (including parameter name and parameter value) input by the front end: personal medical card number (param_id: "A3500000"), time interval (param_time: ("2018-07-01", "2023-10-31");

[0058] (2) Query the parameter name and field name mapping dictionary to map the parameter name in the ad hoc query parameter to the field name of the subtable:

[0059]

[0060] (3) Based on the parameter values ​​"A3500000", "2018-07-01" and "2023-10-31" and the field names "id_card" and "visit_time", according to the field query logic, the query condition statement is spliced ​​as follows:

[0061] Where id_card = "A3500000" AND visit_time>= '2018-07-01' AND visit_time<='2023-10-31';

[0062] (4) Reverse search based on parameter values ​​and table field names Figure 4 The mapping dictionary between the sub-table field name and the sub-table information view field name determines the table name set of the sub-library and sub-table to be queried. Figure 3 :

[0063] Intersection fields: query the sub-table field name (i.e. the field name after parameter name conversion) and the sub-table field name of the sub-table information view and the sub-table information view field name mapping dictionary to obtain the intersection fields [visit start time, visit end time, visit card prefix];

[0064] Intersection value range: ① Find the value whose start time of the consultation is smaller than '2018-07-01' but closest to it. The corresponding query condition statement is as follows:

[0065] select max(consultation start time) FROM split_tables where consultation start time <='2018-07-01';

[0066] ② Find the value whose end time is greater than '2023-10-31' and closest to it. The corresponding query condition statement is as follows: select min(end time of consultation) FROM split_tables where end time>= '2023-10-31';

[0067] ③The first letter of the card number is "A";

[0068] Determine the table name or table name set: In the split table information view split_tables, query the card numbers between ① and ② with the first letter "A". The corresponding query condition statement is as follows: SELECT table_name FROM split_tableswhere consultation start time>=① and consultation end time<=② and consultation card prefix='A', and the following table name set is obtained:

[0069]

[0070] (5) Loop through the table names or table name sets of the sub-databases and sub-tables, and generate query condition statements based on the database information and table information of each table to obtain the query syntax of a single table; then concatenate the query syntaxes of each single table to obtain the final query condition statement text, such as Figure 5 As shown;

[0071] (6) According to Figure 5 The query condition statement text shown is used to execute the query and obtain the query result.

[0072] Embodiment 2

[0073] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0074] Specifically, each step of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor, or a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.

[0075] Embodiment 2 of the present invention provides a dynamic cross-table ad hoc query system, such as Figure 6 As shown, the dynamic cross-table ad hoc query system 700 may include: a memory 710 and a processor 720, wherein the memory 710 is used to store a computer program and transmit the program code to the processor 720. In other words, the processor 720 may call and run the computer program from the memory 710 to implement the method of the first embodiment of the present application. For example, the processor 720 may be used to execute the above method embodiment according to the instructions in the computer program.

[0076] In some embodiments of the present application, the processor 720 may include but is not limited to:

[0077] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0078] In some embodiments of the present application, the memory 710 includes, but is not limited to, volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAMbus RAM (DRRAM).

[0079] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 710 and executed by the processor 720 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 700.

[0080] like Figure 6 As shown, the dynamic cross-table ad hoc query system may also include: a transceiver 730, which may be connected to the processor 720 or the memory 710. The processor 720 may control the transceiver 730 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 730 may include a transmitter and a receiver. The transceiver 730 may further include an antenna, and the number of antennas may be one or more.

[0081] It should be understood that the various components in the dynamic cross-sub-table ad hoc query system 700 can be connected via a bus system, wherein the bus system includes a power bus, a control bus, and a status signal bus in addition to a data bus.

[0082] Embodiment 3

[0083] Embodiment 3 of the present invention further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer is enabled to execute the method of the above method embodiment.

[0084] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the first embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state disk (solid state disk, SSD)), etc.

[0085] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. Dynamic cross-table ad hoc query method, characterized by The steps include: Step 1: After the database is divided into sub-libraries and sub-tables, the monitoring program is triggered to generate a sub-table information view that records the business data range of each sub-table; The sub-table information view is a pre-created entity table, with a mapping dictionary of sub-table field names and sub-table information view field names, which is used to determine a specific sub-library sub-table or sub-table set in the query of the sub-table field name and parameter value converted by the parameter conversion module to reversely query the sub-table information view. The sub-table information view records all sub-table information corresponding to the business data, which includes historical data and real-time data, including metadata information and business data range stored in the table. The metadata information is a subset of the metadata database, including library connection information and sub-table table names. The business data range allows setting as required. The metadata database refers to the metadata information of all tables in the entire database; The content of the sub-table information view is generated by the monitoring program, and the sub-table information view data can be added, deleted or modified due to human or sub-table events. When a new sub-table is added or the table name of an existing sub-table is deleted or renamed, the addition, deletion or modification event is triggered; when the table name is renamed, the monitoring program scans the metadata database to delete the record information of the original table name and inserts the record information of the new table name; each time the database is sub-divided, the monitoring program scans the metadata database to automatically insert the record information of the new table name; The monitoring program consists of scanning events and calling stored procedures, and updates the metadata information in the sub-table information view by scanning the difference between the metadata database and the sub-table information view; Traverse each record in the sub-table information view, query the corresponding sub-table to obtain business data and update it to the field value range of the sub-table information view; Step 2: The front-end inputs the ad hoc query parameters, which include parameter names and parameter values, and passes them to the back-end parameter conversion module for parameter conversion. The parameter conversion module maps the input parameter names to sub-table field names by querying the parameter name and field name mapping dictionary. The parameter value determines the value range of the field. The sub-table field name combined with the corresponding parameter value determines the data range of the query; Step 3: Generate query condition statements by combining table field names and parameter values ​​with field query logic; Step 4: According to the parameter value obtained after parameter conversion and the sub-table field name, the sub-table field name in the sub-table information view and the sub-table information view field name mapping dictionary are searched to obtain the intersection field; then, according to the intersection field, the intersection of the field value range in the sub-table information view and the parameter value obtained by the parameter conversion module is obtained to query and obtain the table name or table name set of the sub-library and sub-table; Step 5: loop through the table names or table name sets of the sub-databases and sub-tables obtained by querying in step 4, and combine the database information and table information of each table with the query condition statement generated in step 3 to obtain the query syntax of a single table; then combine the query syntaxes of each single table to obtain the final query condition statement text; Step 6: Execute the query according to the assembled query condition statement text to obtain the query result.

2. The dynamic cross-table ad hoc query method according to claim 1 is characterized in that: The parameter values ​​transmitted from the front end to the back end are encrypted and decrypted. That is, when the front end queries, the parameter values ​​passed in are encrypted by the encryption function and then transmitted to the parameter conversion module of the back end, and then decrypted by the decryption function to obtain the passed in parameter values.

3. The dynamic cross-table ad hoc query method according to claim 1 is characterized in that The field query logic refers to: If the parameter value is list, the corresponding field query logic is "in"; If the parameter value is a single value, the corresponding field query logic is "="; If the parameter value is a single value ending with *, the corresponding field query logic is "like"; If the parameter value is a range, the corresponding field query logic is ">= AND <=".

4. A dynamic cross-table ad hoc query system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the dynamic cross-sub-table ad hoc query method according to any one of claims 1 to 3 is implemented.

5. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the dynamic cross-sub-table ad hoc query method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Cross-library and cross-table query method and device, server and storage medium

    CN111259036A

  • Database table division method and device, electronic equipment and storage medium

    CN117874033A

  • Method of creating dynamic query, server performing the same and storage media storing the same

    KR1020130140510A