A Dynamic Parameter Query Method, System, Report Designer, and Storage Medium
By extracting the query configuration information of business data in the report designer and determining the neighborhood anchor points of neighboring business data, and optimizing the query index table and logical items, the dependencies and conflicts in dynamic parameter queries are solved, and the compatibility of dynamic query and the accuracy of query results are improved.
Patent Information
- Application Number
- CN202411107589.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2044-08-13
AI Technical Summary
Existing dynamic parameter query technology cannot effectively utilize the database's query caching mechanism, resulting in dependencies or conflicts between dynamic parameters, thereby reducing the compatibility of dynamic query.
By obtaining the query request of the target user, extracting the business data query configuration information in the report designer, determining the neighborhood anchor points of adjacent business data, and optimizing the query index table and query logic items in static and dynamic times, and dynamically adjusting the query conditions to generate the target query results.
It realizes dynamic logical allocation during dynamic parameter query, improves dynamic query compatibility during dynamic parameter query, and ensures consistency and accuracy of query results.
Smart Images

Figure CN119127872B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of parameter query. More specifically, this application relates to a dynamic parameter query method, system, report designer, and storage medium. Background Art
[0002] Parameter query is a data retrieval technique that allows users to provide parameter values at runtime, thereby dynamically generating and executing query statements. This technique is widely used in fields such as report generation, data analysis, and search functions. By using parameter placeholders, the query conditions are changed from hard-coded to configurable. Users can customize the query conditions by inputting or selecting parameter values. The system replaces these placeholders with the parameter values at runtime to generate specific query statements. Dynamic parameter query improves the flexibility of the query and the user experience, while enhancing security.
[0003] The dynamic parameter query method refers to a technical method in database query and data retrieval processes. By using parameter placeholders in the query statement and having users provide specific parameter values at runtime, it dynamically generates and executes the query. It includes: defining parameter placeholders in the query statement, designing a user input interface to obtain parameter values, using the parameter values provided by the user to replace the placeholders to generate the actual query statement, and executing the generated query to return the results. It allows users to adjust the query conditions as needed, while enhancing security and preventing Structured Query Language (SQL) injection attacks. However, in existing dynamic parameter queries, the dynamic query statements are different each time a dynamic query is executed, and the query cache mechanism of the database cannot be utilized, resulting in possible dependencies or conflicts between dynamic parameters. For example, selecting an invalid date range or a mismatched product category may cause the query results to not meet expectations, and it is impossible to achieve dynamic logic allocation during dynamic parameter query, thereby reducing the dynamic query compatibility ability during dynamic parameter query. Therefore, how to achieve dynamic logic allocation during dynamic parameter query and improve the dynamic query compatibility ability during dynamic parameter query is a problem faced by the industry. Summary of the Invention
[0004] This application provides a dynamic parameter query method, system, report designer, and storage medium, which can achieve dynamic logic allocation during dynamic parameter query and effectively improve the dynamic query compatibility ability during dynamic parameter query.
[0005] In a first aspect, this application provides a dynamic parameter query method, including the following steps:
[0006] Obtain a query request uploaded by a target user at the user side of the report designer;
[0007] Extract the query configuration information of each business data in the report designer according to the query request, and determine the neighborhood anchor points of the query configuration information in adjacent business data through the query configuration information of all business data;
[0008] Determine the query index table of the database of the report designer in the static state, perform hierarchical fusion on the query index table to obtain the query index values of different query logic layers, and determine the query logic items of the database of the report designer in the static state according to the neighborhood anchor points and all query index values;
[0009] Obtain the dynamic data segment of the database of the report designer in the dynamic state, determine the query conditions at the dynamic time nodes during query according to the dynamic data segment, and determine the query trapdoors of the database of the report designer in the dynamic state according to the neighborhood anchor points and the query conditions;
[0010] Determine the query cost during dynamic parameter query according to the query logic items and the query trapdoors, and determine the target query results of the dynamic parameters in the report designer according to the query cost.
[0011] In some embodiments, extracting the query configuration information of each business data in the report designer according to the query request specifically includes:
[0012] Parse the query request to obtain multiple query configuration items;
[0013] Classify the business data in the report designer according to all query configuration items to obtain the query configuration information of each business data.
[0014] In some embodiments, determining the neighborhood anchor points of the query configuration information in adjacent business data through the query configuration information of all business data specifically includes:
[0015] Determine the configuration feature quantities in the query configuration information of all business data;
[0016] Determine the mutual neighborhood similarity in the query configuration information of adjacent business data according to all configuration feature quantities;
[0017] Determine the neighborhood anchor points in the query configuration information of adjacent business data according to the mutual neighborhood similarity.
[0018] In some embodiments, determining the query index table of the database of the report designer in the static state specifically includes:
[0019] Obtain the business data set of the database of the report designer in the static state;
[0020] Determine multiple query index quantities according to the business data set;
[0021] Determine the query index table of the report designer's database at static time based on the amount of all query indexes.
[0022] In some embodiments, performing hierarchical fusion on the query index table to obtain query index values of different query logic layers specifically includes:
[0023] Determine valid query features in the query index table;
[0024] Extracting query logic information from the effective query features;
[0025] All query logic information is processed in a hierarchical manner to obtain hierarchical query index degrees;
[0026] All query index degrees of each level are connected to obtain query index values of different query logic layers.
[0027] In some embodiments, determining the query logic items of the database of the report designer at a static state according to the neighborhood anchor point and all query index values specifically includes:
[0028] Determining a query priority value based on the neighborhood anchor point and all query index values;
[0029] Determine the query logic characteristics of the report designer's database when it is static;
[0030] The query logic items of the database of the report designer when it is static are determined according to the query priority value and the query logic characteristics.
[0031] In some embodiments, determining the query condition at the dynamic time node during query according to the dynamic data segment specifically includes:
[0032] Mapping the query data in the dynamic data segment to a configuration target location during dynamic parameter query;
[0033] Determine the amount of configuration query optimization at dynamic time nodes during query;
[0034] Generate query conditions at dynamic time nodes during querying according to the configured target position and the configured query optimization amount.
[0035] In a second aspect, the present application provides a dynamic parameter query system, comprising:
[0036] The acquisition module is used to acquire the query request uploaded by the target user on the user end of the report designer;
[0037] A processing module, configured to extract query configuration information of each business data in the report designer according to the query request, and determine a neighborhood anchor point of query configuration information in adjacent business data through the query configuration information of all business data;
[0038] The processing module is further configured to determine a query index table of the database of the report designer in a static state, perform hierarchical fusion on the query index table to obtain query index values of different query logic layers, and determine query logic items of the database of the report designer in a static state according to the neighborhood anchor points and all the query index values;
[0039] The processing module is further configured to obtain a dynamic data segment of the database of the report designer in a dynamic state, determine a query condition at a dynamic time node during query according to the dynamic data segment, and determine a query trapdoor of the database of the report designer in a dynamic state according to the neighborhood anchor points and the query condition;
[0040] The execution module is configured to determine a query cost during dynamic parameter query according to the query logic items and the query trapdoor, and determine a target query result of the dynamic parameters in the report designer according to the query cost.
[0041] In a third aspect, the present application provides a report designer, which includes the above-mentioned dynamic parameter query system.
[0042] In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned dynamic parameter query method is implemented.
[0043] The technical solutions provided by the embodiments disclosed in the present application have the following beneficial effects:
[0044] For the dynamic parameter query method, system, report designer and storage medium provided by the present application, first, a query request uploaded by a target user at the user end of the report designer is obtained; secondly, query configuration information of each business data in the report designer is extracted according to the query request, and neighborhood anchor points of the query configuration information in adjacent business data are determined through the query configuration information of all business data; then, a query index table of the database of the report designer in a static state is determined, hierarchical fusion is performed on the query index table to obtain query index values of different query logic layers, and query logic items of the database of the report designer in a static state are determined according to the neighborhood anchor points and all the query index values; then, a dynamic data segment of the database of the report designer in a dynamic state is obtained, a query condition at a dynamic time node during query is determined according to the dynamic data segment, and a query trapdoor of the database of the report designer in a dynamic state is determined according to the neighborhood anchor points and the query condition; finally, a query cost during dynamic parameter query is determined according to the query logic items and the query trapdoor, and a target query result of the dynamic parameters in the report designer is determined according to the query cost.
[0045] It can be seen that the present application first determines the query logic items of the database of the report designer at static time according to the neighborhood anchor points and all query index values, so that the query can be dynamically adjusted and optimized according to specific parameter conditions during runtime. When the dynamic parameter query involves different query conditions and variables, it may cause changes in the structure and execution path of the query statement. By optimizing the query logic items at static time, the system can better handle the changes of dynamic parameters and ensure the consistency and accuracy of the query results. Then, according to the neighborhood anchor points and query conditions, the query trapdoor of the database of the report designer at dynamic time is determined. The query conditions can be adjusted and optimized according to dynamic parameters or user inputs to adjust the conditions of the query, so as to dynamically generate query statements that meet the actual requirements. According to the set query trapdoor, it can be ensured that the system can handle various possible input situations and correctly generate and execute the query, avoiding query failures or inconsistencies caused by changes in input conditions. Finally, according to the query logic items and query trapdoor, the query cost during dynamic parameter query is determined, and the target query results of the dynamic parameters in the report designer are determined according to the query cost. To effectively overcome the query conflicts caused by different combinations and conditions of dynamic parameters, the query logic is dynamically allocated and adjusted according to different input conditions or query requirements to minimize the query cost and optimize the query execution, so as to obtain the target query results that meet the expectations. In summary, the dynamic logic allocation during dynamic parameter query can be realized, and the dynamic query compatibility ability during dynamic parameter query can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is an exemplary flowchart of a dynamic parameter query method according to some embodiments of the present application;
[0047] Figure 2 is a schematic diagram of a multi-level index logic structure diagram according to some embodiments of the present application;
[0048] Figure 3 is a schematic diagram of a dynamic parameter query process model according to some embodiments of the present application;
[0049] Figure 4 is a schematic diagram of exemplary hardware and / or software of a dynamic parameter query system according to some embodiments of the present application;
[0050] Figure 5 is a schematic diagram of the structure of a computer device for implementing the dynamic parameter query method according to some embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] The core of this application is that after obtaining the query request uploaded by the target user at the user side of the report designer, extracting the query configuration information of each business data in the report designer according to the query request, determining the neighborhood anchor points of the query configuration information in adjacent business data through the query configuration information of all business data, determining the query index table when the database of the report designer is static, performing hierarchical fusion on the query index table to obtain the query index values of different query logic layers, determining the query logic items of the database of the report designer when static according to the neighborhood anchor points and all query index values, obtaining the dynamic data segment when the database of the report designer is dynamic, determining the query conditions at the dynamic time nodes during query according to the dynamic data segment, determining the query trapdoor of the database of the report designer when dynamic according to the neighborhood anchor points and the query conditions, determining the query cost during dynamic parameter query according to the query logic items and the query trapdoor, and determining the target query result of the dynamic parameters in the report designer according to the query cost, so as to complete the dynamic parameter query, which can realize the dynamic logic allocation during dynamic parameter query and improve the dynamic query compatibility ability during dynamic parameter query.
[0052] To better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners. Refer to Figure 1 , this figure is an exemplary flowchart of the dynamic parameter query method shown in some embodiments of this application. The dynamic parameter query method 100 mainly includes the following steps:
[0053] In step 101, obtain the query request uploaded by the target user at the user side of the report designer.
[0054] Specifically, first, design a query input control in the user interface for the user to input or select query conditions; second, the query conditions input by the user can be captured when the user submits the query request, for example, using a high-level, interpreted programming language (such as JavaScript) to capture the query conditions when the user submits, and encapsulating them into a query request object; then, the request object can be sent to the server side through technologies for creating interactive and dynamic web applications (such as AJAX) or other communication technologies; finally, the server side receives and parses the request to generate the corresponding query statement or configuration, that is, the user's query request can be effectively obtained.
[0055] It should be noted that in this application, the query request uploaded by the client represents a request for the target user to input or select query conditions through the user interface of the report designer and submit these conditions to the server side to generate a corresponding report or perform data retrieval. This query request usually contains parameters and conditions specified by the user, such as time range, classification, keywords, etc.; for example, in the report designer, the query user selects a time range and specifies a product category, and then clicks the "submit" button. This operation generates a query request containing the time range and product category information input by the query user and sends the request to the server side for corresponding data query and report generation.
[0056] In step 102, according to the query request, extract the query configuration information of each business data in the report designer, and determine the neighborhood anchor points of the query configuration information in adjacent business data through the query configuration information of all business data.
[0057] In some embodiments, as shown in Figure 2 the figure is a schematic diagram of a multi-level index logic structure diagram according to some embodiments of the present application. In this application, the business data for dynamic parameter query in the report designer is set as financial business data, and this financial business data includes macroeconomic data, financial data, market data, transaction data, etc.; financial business data is different from general data. In addition to having the general characteristics of data, it also has its own unique properties such as extensiveness, reliability, and continuity. Therefore, the input review of financial data is more stringent, the storage capacity is larger, the network transmission is more extensive, the data maintenance is more frequent, and the data distribution is more uneven. These characteristics distinguish financial business data from other data, and at the same time pose more challenges to the retrieval and query of relevant data. Therefore, it is necessary to effectively divide the massive financial business data into subsets using this multi-level index structure, so that the query person can quickly locate the corresponding data object in the financial business database and improve the work efficiency. For this reason, it is first necessary to analyze the multi-level index logic structure.
[0058] The traditional indexing method is that the data file and the directory directly correspond to an index value, that is, the so-called first-level indexing method. This method has low efficiency and may encounter problems of data query errors due to the same file name. In the multi-level index logic structure, it can be divided into the first-level index, the second-level index, the third-level index, etc. The first-level index will divide a large space, so that each space corresponds to a first-level index. The second-level index will be further divided within the space corresponding to the first-level index, and so on. Multiple levels can be set to improve the data query efficiency and accuracy, and this method can better handle data with frequent large-scale updates, and the advantages are more obvious.
[0059] In some embodiments, extracting query configuration information of each business data in the report designer according to the query request can be implemented by the following steps:
[0060] Parsing the query request to obtain multiple query configuration items;
[0061] Classify the business data in the report designer according to all query configuration items to obtain the query configuration information of each business data.
[0062] In the specific implementation, first, in order to clarify the data range and specific conditions that the query user wants to query, the query request is parsed to extract various query parameters, such as date range, category, keyword, etc., wherein the process of parsing the query request can be to parse the query parameters in the request body after the backend receives the request, and the parsing can be completed by code, such as parsing the application layer protocol for transmitting hypertext in the programming language to perform query request parsing of the request body statement, and corresponding query configuration items can be generated according to the date range, category, keyword, etc. Each query parameter can be used as a type of query configuration item, and the query parameter setting query configuration item can be selected according to actual needs, which is not limited here; then, according to the parsed query configuration item, the business data is classified and, This process can logically classify business data according to different query dimensions (such as time, category, geographic location, etc.). For example, it can be divided into different time periods according to the time dimension, and it can be divided into different product or service categories according to the category. The data of each category will form an independent business data partition, so that query configuration information can be generated in a targeted manner later; finally, the corresponding query configuration information is generated for each divided business data partition. This configuration information will contain specific query conditions, parameters and data source information. The generated query configuration information should be stored in a structured manner for quick access and use in subsequent query processes. By generating query configuration information, it can be ensured that queries for each business data partition can be performed efficiently and accurately.
[0063] It should be noted that the query configuration items in this application represent the specific parameters and conditions used to define and manage query operations in the report designer. The query configuration items are the bridge between the query request and the actual data retrieval, ensuring that the query process is efficient and accurate. The information contained in the query configuration items helps the system generate correct query statements based on the user's query request and perform corresponding data retrieval; the query configuration information for multiple categories of business data represents a set of query configuration items generated for different categories of business data. These configuration information are used to define and manage specific query conditions and parameters for each category of business data, ensuring that the data required by the user can be accurately and efficiently retrieved and presented in the report designer.
[0064] In some embodiments, the neighborhood anchor points of the query configuration information in adjacent business data can be determined based on the query configuration information of all business data by the following steps:
[0065] Determine the configuration feature quantities in the query configuration information of all business data;
[0066] Determine the mutual neighborhood similarity in the query configuration information of adjacent business data according to all the configuration feature quantities;
[0067] Determine the neighborhood anchor points in the query configuration information of adjacent business data according to the mutual neighborhood similarity.
[0068] In specific implementation, first, conduct a systematic analysis of the query configuration information to identify the key attributes or parameters that can describe the query characteristics and behaviors of each type of business data. For example, for time data, there can be a start time and an end time, and for product data, there can be a product category, a price range, etc. Take the sales amount in the product data as the configuration feature quantity in the query configuration information of the business data. In other embodiments, the sales date, product category, etc. can also be used as the configuration feature quantity in the query configuration information of the business data, which is not limited here. Then, a similarity metric needs to be defined. Usually, according to the business requirements and the nature of the features, select an appropriate similarity metric method. Commonly used similarity metric methods include cosine similarity, Euclidean distance, and Jaccard similarity coefficient. In this application, the Jaccard similarity coefficient is selected to calculate the mutual neighborhood similarity in the query configuration information of adjacent business data. In other embodiments, other methods can also be used to determine the mutual neighborhood similarity in the query configuration information of adjacent business data. For example, for the time range feature, the overlap degree of the time periods of two types of data or the relative size of the intervals can be calculated, and for the product category feature, the proportion of the common product categories of two types of data can be calculated, etc. Finally, take the specific intersection point between two types of business data as the key node for dynamic parameter query of adjacent data categories. This neighborhood anchor point is usually identified as a specific data intersection or overlap area in the similarity analysis. Then, according to the calculated mutual neighborhood similarity results, filter out the neighborhood anchor points. These anchor points span the key parameters and conditions of adjacent business data categories during the dynamic parameter query process. The neighborhood anchor points cover the overlap of time ranges, the intersection of product categories, the proximity of geographical locations, etc. Among them, before filtering out the neighborhood anchor points, all the mutual neighborhood similarities greater than their average value can be used as the candidates for the neighborhood anchor points, and finally, filtering is performed from the candidates, which is not limited here.
[0069] It should be noted that the configuration feature quantities in the query configuration information in this application are key attributes or parameters used to describe and define the query behaviors and characteristics of each type of business data; the mutual neighborhood similarity is a measure of the similarity degree of each feature quantity in the query configuration information of adjacent business data, and this measure of similarity degree is usually used to compare and evaluate the consistency and similarity of the configuration information between two adjacent business data categories. Specifically, the mutual neighborhood similarity can calculate its similarity according to different feature quantities (such as time range, product category, geographical location, etc.) to determine the commonalities and overlapping degrees of business data categories in terms of query parameters, data sources, logical connections, etc.; the neighborhood anchor points in the query configuration information represent specific connection points or key parameters between adjacent business data, which are used to support effective data interaction and query operations across adjacent data categories during the dynamic parameter query process.
[0070] In step 103, determine the query index table of the report designer's database in the static state, perform hierarchical fusion on the query index table to obtain query index values of different query logic layers, and determine the query logic items of the report designer's database in the static state according to the neighborhood anchor points and all query index values.
[0071] In some embodiments, as Figure 3 shown, this figure is a schematic diagram of the dynamic parameter query process model according to some embodiments of this application. In the dynamic parameter query of the report designer, in order to completely save and efficiently query the data in the report designer, before the dynamic parameter query, the owner of the financial business data (the financial business data stored in the report designer) will encrypt the privacy data (the key is stored locally) and store it in the cloud server. When the query user needs to use the query service, first send a registration request to the data owner. Once the data owner receives the request and registers the user, the key will be sent to the user. Then the user sends a query request to the cloud server. The cloud server queries the encrypted privacy data through a query algorithm (such as the Skyline query algorithm) and sends the query result data to the query user. After receiving the query result data, the query user decrypts it through the local key to finally obtain the plaintext query result.
[0072] In some embodiments, the determination of the query index table of the report designer's database in the static state can be implemented by the following steps:
[0073] Obtain the business data set of the report designer's database in the static state;
[0074] Determine multiple query index quantities according to the business data set;
[0075] Determine the query index table of the report designer's database in the static state according to all query index quantities.
[0076] In specific implementation, the coefficient method can be adopted to obtain the business data set of the report designer's database at rest, that is: collect all data sources in the report designer's database from the end of the last data storage to the current moment, including the data content in database tables, views, files, etc. in chronological order, and place all the data in a set to obtain the business data set of the report designer's database at rest. Among them, when collecting data sources in chronological order, the sales amount of product data in the data source is selected as the collection object. In other embodiments, other data can also be selected, which is not limited here.
[0077] It should be noted that the business data set of the report designer's database at rest in this application represents the set of all business data during the period when no operation is performed on the business data stored in the report designer.
[0078] In addition, it should be noted that when the report designer's database is at rest, it represents the state at a specific moment when no operation is performed on the report designer's database (for example, no operation is performed on the business data stored in the report designer), and there will be no frequent data updates, insertions or deletions. The content in the database in this static state remains unchanged for a period of time, and consistent data analysis and query optimization can be performed.
[0079] In specific implementation, the following method can be adopted to determine multiple query index quantities according to the business data set, that is: divide all the data in the business data set at equal intervals. For example, take one hour as a division length, and the data in the last division interval with a time length less than one hour is calculated as one hour. Then, the average value of all the data in each interval is used as the query index quantity for all intervals. In other embodiments, the common query operations and query patterns can also be determined by analyzing historical query logs and user behaviors, and the frequently queried fields and conditions, such as time range, product category, geographical location, etc., can be identified. Then, according to the nature of each key query field and the characteristics of query operations, the appropriate index type can be selected, which is not limited here.
[0080] It should be noted that the query index quantity in this application represents a set of specific indexes for optimizing the database query performance. This index is determined based on business requirements and query patterns, aiming to improve the query efficiency and response speed. The query index quantity includes all the index sets designed and created for efficient query.
[0081] In specific implementation, the query index table of the database of the report designer in the static state can be implemented in the following manner according to all query index quantities, that is: taking each query index quantity as a key field of the database of the report designer in the static state, and according to this key field, taking the data within the interval where the query index quantity is located as the key information in the key field, and finally generating an index table according to this key information and the key data segment. This process can be implemented by using a database management tool or a script. Finally, inputting the data in the sorted database into the table to obtain the query index table of the database of the report designer in the static state. In other embodiments, it can also be determined in other ways, which is not limited here.
[0082] It should be noted that the query index table of the database of the report designer in the static state in this application represents a structured data table, which is used to store and manage database index information to optimize and accelerate database query operations. It contains detailed information of the index, including index name, table name, field name, index type, creation time, and current status, etc. These information help the database system quickly locate and access relevant data during query, thereby improving query efficiency and performance.
[0083] In addition, it should be noted that the index table in this application represents a dedicated data structure established by the system for a file whose information is stored in several discontinuous physical blocks. In order to quickly and accurately find relevant financial business data in the financial business database, mine more utilization value from it, and improve the speed of financial business development.
[0084] In some embodiments, the following steps can be adopted to perform hierarchical fusion on the query index table to obtain query index values of different query logic layers:
[0085] Determine the effective query features in the query index table;
[0086] Extract the query logic information in the effective query features;
[0087] Perform hierarchical processing on all query logic information to obtain a hierarchical query index degree;
[0088] Connect all hierarchical query index degrees to obtain query index values of different query logic layers.
[0089] In specific implementation, first, calculate the ratio of the variance of the sales amount of the product data corresponding to each index information in the query index table to the number of the sales amounts of the product data to obtain multiple ratios, and use all the ratios as the effective query features corresponding to each index information in the query index table respectively; then, subtract each effective query feature from the mean value of the effective query features respectively, and take the absolute value, and use the absolute value as the query logic information in the effective query features. In other embodiments, other methods may also be used to determine the query logic information in the effective query features, which is not limited here; then, divide the financial business data in the report designer into a high-priority query logic layer, a medium-priority query logic layer, and a low priority, that is, obtain different query logic layers. The division of different logic layers can be performed by machine learning, which will not be elaborated here. Then, map the query logic information to each query logic layer, and use the data center of the query logic information in each query logic layer as the hierarchical query index degree. The data center of the query logic information in each query logic layer can be determined by a data feature fusion algorithm (such as principal component analysis), which is not limited here; finally, determine the query index value of different query logic layers according to the distance between each hierarchical query index degree and the mean value of all hierarchical query index degrees (the Euclidean distance can be used), that is, use the distance between each hierarchical query index degree and the mean value of all hierarchical query index degrees as the query index value of different query logic layers. In other embodiments, other methods may also be used to determine, which is not limited here.
[0090] It should be noted that in this application, the effective query feature represents the feature attribute that can significantly affect the query performance, result accuracy, or system resource utilization in the dynamic parameter query; the query logic information represents various key information and strategies for describing and planning the query execution during the dynamic parameter query process; the hierarchical query index degree represents the metric for measuring the importance or efficiency of the query at a specific logic level or priority during the dynamic parameter query process; the query index value of different query logic layers represents a numerical value or score assigned to each logic layer for different query logic levels or priorities in the dynamic parameter query. This index value is usually used to represent the importance, priority, or execution efficiency of the query under each logic layer, which helps the system to dynamically adjust the query processing strategy according to the specific business requirements and performance goals.
[0091] In some embodiments, the query logic items of the database of the report designer in the static state can be determined according to the neighborhood anchor points and all the query index values by the following steps:
[0092] Determine the query priority value according to the neighborhood anchor points and all the query index values;
[0093] Determine the query logic features of the database of the report designer in the static state;
[0094] Determine the query logic items of the database of the report designer when it is static according to the query priority value and the query logic characteristics.
[0095] In specific implementation, first, normalize the neighborhood anchor points and all query index values and then compare them. If the neighborhood anchor point is greater than or equal to the query index value, use the neighborhood anchor point as the query priority value. Otherwise, if the neighborhood anchor point is less than the query index value, use the query index value as the query priority value. Then, determine the query logic characteristics of the database of the report designer when it is static according to the ratio of the mean value of all neighborhood anchor points and the mean value of query index values when the database of the report designer is static, that is, use the ratio of the mean value of all neighborhood anchor points and the mean value of query index values when the database of the report designer is static as the query logic characteristics of the database of the report designer when it is static. In other embodiments, other methods may also be used to determine the query logic characteristics of the database of the report designer when it is static, which is not limited here. Finally, determine the query logic items of the database of the report designer when it is static according to the percentage of the query priority value and the query logic characteristics, that is, use the percentage of the query priority value and the query logic characteristics as the query logic cost. This query logic cost represents the access cost of the query during dynamic parameter query. The smaller the query logic cost, the faster the query response speed. Then, form a set of all query logic costs and use this set as the query logic items of the database of the report designer when it is static.
[0096] It should be noted that in this application, the query priority value represents the ranking or grading score of the priority during dynamic parameter query, which helps to determine how to allocate resources and schedule the execution order of the query for dynamic parameter query; the query logic characteristics represent the characteristics or attributes used to describe and define the query processing method, optimization strategy, and data access mode in dynamic parameter query. This characteristic is usually used to optimize query performance, improve system efficiency, and manage the data access process; the query logic items represent the logical units or identifiers that describe and manage the query processing priority, execution order, and related operations in dynamic parameter query. By determining the query logic items, database administrators and developers can more precisely control and optimize the query processing process of the database system, thereby improving the overall performance, response ability, and user experience of the system.
[0097] In step 104, obtain the dynamic data segment of the database of the report designer when it is dynamic, determine the query conditions at the dynamic time nodes during query according to the dynamic data segment, and determine the query trapdoor of the database of the report designer when it is dynamic according to the neighborhood anchor point and the query conditions.
[0098] In specific implementation, the dynamic data segment of the database of the report designer in the dynamic state can be implemented in the following manner: First, the report designer receives a query request from the user side. Second, the query request is parsed to determine the required data and conditions. Finally, a database query is executed, and a data segment dynamically generated from all the query results is obtained, that is, the dynamic data segment is obtained.
[0099] It should be noted that in this application, the dynamic data segment refers to a data fragment or data set that is dynamically generated or updated in the report designer according to real-time requirements or changing conditions. This data segment can dynamically change based on factors such as the user's query request, time period, and condition changes to reflect the latest data status or a specific data view.
[0100] In addition, it should be noted that the database of the report designer in this application in the dynamic state generally refers to a state in which the data and query results in the database can be dynamically updated, generated, or presented according to real-time requests or changing conditions (that is, the data in the database in this state is changing rather than static, such as adding data or adjusting positions according to query instructions). This dynamic nature can be reflected in the report designer in real time according to the user's operations or external conditions, rather than a static fixed state.
[0101] In some embodiments, determining the query conditions at the dynamic time node during query according to the dynamic data segment can be implemented by the following steps:
[0102] Map the query data in the dynamic data segment to the configured target position during dynamic parameter query;
[0103] Determine the configured query optimization amount at the dynamic time node during query;
[0104] Generate the query conditions at the dynamic time node during query according to the configured target position and the configured query optimization amount.
[0105] In specific implementation, first, the query data in the dynamic data segment is allocated to the corresponding query positions according to the query conditions, and the query positions after the allocation are used as the configured target positions. Here, the allocation process can adopt algorithms such as constructing query statements, fruit fly algorithms, etc., which are not limited herein. Secondly, the data information at the dynamic time nodes during query is initialized. The initialization process can adopt uniform initialization, which is not limited herein. The result after initialization is iteratively optimized until the termination condition is met to obtain the global optimal solution, and the global optimal solution is output as the configured query optimization amount at the dynamic time nodes during query. Here, the iterative optimization process can be implemented using the fruit fly algorithm. Finally, the query data and the configured query optimization amount at the configured target positions are normalized, and the reciprocal of the arithmetic square root of the sum of squares of the normalized results is obtained. This reciprocal is used as the query condition at the dynamic time nodes during query. In other embodiments, other methods can also be adopted, such as using a decision function to determine the query condition at the dynamic time nodes during query, which is not limited herein.
[0106] It should be noted that in this application, the configured target position refers to the position where the query data in the dynamic data segment is mapped to specific database table fields or query conditions during the dynamic parameter query process. This configured target position is usually a parameter, field, or column in a specific database table in the query statement, and is used to accurately locate and obtain the required data. The configured query optimization amount refers to the quantitative index or metric required for optimizing the query conditions. This optimization amount can be based on different optimization strategies, such as index usage, caching mechanism, query rewriting, etc., and is specifically quantified as certain parameters or numerical values for applying these optimization measures during the query execution process. The query condition refers to the specific constraints and rules set in the query operation. These conditions are used to filter and obtain the data that meets specific requirements. The query conditions can include field value matching, range constraints, sorting rules, etc., aiming to ensure that the result set returned by the query meets the expectations of users or the system.
[0107] In some embodiments, determining the query trapdoor of the report designer's database at runtime according to the neighborhood anchor point and the query condition can be implemented by the following steps:
[0108] Determine the trapdoor adjustment amount of the report designer's database at runtime according to the neighborhood anchor point and the query condition;
[0109] Determine the query logic characteristics of the report designer's database at runtime;
[0110] Determine the trapdoor adjustment amount of the report designer's database at runtime according to the threshold adjustment amount and the query logic characteristics.
[0111] In specific implementation, first, after normalizing the neighborhood anchor points and the query conditions, calculate the ratio of the normalized neighborhood anchor points to the query conditions, and at the same time quantize this ratio to the range of 0 to 1. Use the quantized ratio as the trapdoor adjustment amount of the report designer's database during dynamic operation. Then, determine the query logic feature of the report designer's database during dynamic operation according to the ratio of the mean value of all neighborhood anchor points to the mean value of the query index values in the report designer's database during dynamic operation, that is: use the ratio of the mean value of all neighborhood anchor points to the mean value of the query index values in the report designer's database during dynamic operation as the query logic feature of the report designer's database during dynamic operation. In other embodiments, other methods can also be used to determine the query logic feature of the report designer's database during dynamic operation, which is not limited here. Finally, determine the trapdoor adjustment amount of the report designer's database during dynamic operation according to the product of the threshold adjustment amount and the query logic feature, that is, use the product of the threshold adjustment amount and the query logic feature as the trapdoor adjustment amount of the report designer's database during dynamic operation. In other embodiments, other methods can also be used to determine the trapdoor adjustment amount. For example, set a query response time threshold and include a complex multi-table join operation process, use index optimization, and divide multiple complex multi-table join operations into multiple simple queries, so as to set a trap for the query process, avoid unnecessary query operations from being executed, and optimize the rate of dynamic parameter queries.
[0112] It should be noted that in this application, the trapdoor adjustment amount represents a set of adjustable parameters and strategies introduced to optimize query performance during the dynamic query process of the database, in order to improve query efficiency, reduce resource consumption, and improve system response speed; the query logic feature of the report designer's database during dynamic operation represents the execution efficiency of query operations in the report designer's database during the dynamic operation environment of the database. By identifying and optimizing this feature, the response speed and overall performance of database queries can be improved; the trapdoor adjustment amount represents a trap set to prevent misoperations or unauthorized access during the dynamic parameter query process. The larger the value of this trapdoor adjustment amount, the higher the protection level against misqueries, the greater the query cost consumption index during dynamic parameter queries, and the lower the query efficiency and scalability.
[0113] In step 105, determine the query cost during dynamic parameter query according to the query logic item and the query trapdoor, and determine the target query result of the dynamic parameter in the report designer according to the query cost.
[0114] In some embodiments, determining the query cost during dynamic parameter query according to the query logic item and the query trapdoor can be implemented by the following steps:
[0115] Determine the time dilation amount during the current dynamic parameter query according to the query logic item;
[0116] Determine the time consumption during the query of the global dynamic parameter according to the query trapdoor;
[0117] Determine the query cost during the dynamic parameter query according to the time dilation and the time consumption.
[0118] When specifically implemented, first, the time dilation during the current dynamic parameter query can be determined according to the average value of the time required to access the business data in all query logic items, that is: the average value of the time required to access the business data in all query logic items is used as the time dilation during the current dynamic parameter query; then, the time consumption during the global dynamic parameter query can be determined according to the average value of all the times on the query trapdoor when performing the dynamic parameter query, that is: the average value of all the times on the query trapdoor when performing the dynamic parameter query is used as the time consumption during the global dynamic parameter query. In other embodiments, other methods can also be used, which are not limited here; finally, the query cost during the dynamic parameter query is determined according to the ratio of the time dilation during the current dynamic parameter query to the time consumption during the global dynamic parameter query, that is: after normalizing the ratio of the time dilation during the current dynamic parameter query to the time consumption during the global dynamic parameter query to the range of 0 to 1, the normalized result is used as the query cost during the dynamic parameter query. In other embodiments, the particle swarm algorithm or the ant colony algorithm can also be used to determine the query cost during the dynamic parameter query, which is not limited here.
[0119] It should be noted that the time dilation during the previous dynamic parameter query in this application represents the time length required to access the business data in the query logic item during the query; the time consumption during the global dynamic parameter query represents the time length consumed during all dynamic parameter queries during the period from the previous static state of the report designer's database to the next static state of the report designer's database; the query cost during the dynamic parameter query represents a measure to optimize the query performance during the dynamic parameter query. The smaller the query cost during the dynamic parameter query, the faster the dynamic parameter query speed, and the better the query efficiency, resource utilization rate, and system scalability during the query.
[0120] In specific implementation, the target query result of the dynamic parameter in the report designer can be determined according to the query cost by the following method: set a query cost threshold, compare the query cost with the query cost threshold. When the query cost is less than or equal to the query cost threshold, there is no need to adjust the query rule of the dynamic parameter query. When the query cost is greater than the query cost threshold, it is necessary to feedback and adjust the query rule of the dynamic parameter query to ensure the efficiency during the dynamic parameter query, thereby realizing the dynamic logic allocation during the dynamic parameter query and improving the dynamic query compatibility ability during the dynamic parameter query. Among them, setting the query cost threshold can set the query cost threshold based on execution time or query cost according to expert experience, which is not limited here.
[0121] In addition, on the other hand of the present application, in some embodiments, the present application provides a dynamic parameter query system. Refer to Figure 4 , which is a schematic diagram of exemplary hardware and / or software of the dynamic parameter query system according to some embodiments of the present application. The dynamic parameter query system 400 includes: an acquisition module 401, a processing module 402, and an execution module 403, which are described as follows:
[0122] The acquisition module 401 is mainly used in the present application to acquire the query request uploaded by the target user at the user side of the report designer.
[0123] The processing module 402 is mainly used in the present application to extract the query configuration information of each business data in the report designer according to the query request, and determine the neighborhood anchor points of the query configuration information in adjacent business data through the query configuration information of all business data.
[0124] The processing module 402 is further used to determine the query index table of the database of the report designer in the static state, perform hierarchical fusion on the query index table to obtain the query index values of different query logic layers, and determine the query logic items of the database of the report designer in the static state according to the neighborhood anchor points and all query index values.
[0125] The processing module 402 is further used to obtain the dynamic data segment of the database of the report designer in the dynamic state, determine the query conditions at the dynamic time nodes during the query according to the dynamic data segment, and determine the query trapdoor of the database of the report designer in the dynamic state according to the neighborhood anchor points and the query conditions.
[0126] The execution module 403 is mainly used in the present application to determine the query cost during the dynamic parameter query according to the query logic items and the query trapdoor, and determine the target query result of the dynamic parameter in the report designer according to the query cost.
[0127] In addition, the present application also provides a report designer, which is widely used in fields such as commerce, finance, healthcare, and education. The report designer usually has a user-friendly interface and powerful data processing capabilities, enabling users to extract information from different data sources. The report designer in the present application includes the above-mentioned dynamic parameter query system, which can implement the dynamic parameter query function and will not be elaborated here.
[0128] The present application also provides a computer device, which includes a memory and a processor. The memory stores code, and the processor is configured to obtain the code and execute the above-mentioned dynamic parameter query method.
[0129] In some embodiments, referring to Figure 5 , this figure is a schematic structural diagram of a computer device for implementing the dynamic parameter query method according to some embodiments of the present application. The dynamic parameter query method in the above embodiments can be implemented by Figure 5 the computer device shown. The computer device 500 includes at least one processor 501, a communication bus 502, a memory 503, and at least one communication interface 504.
[0130] The processor 501 can be a general-purpose central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more for controlling the execution of the dynamic parameter query method in the present application.
[0131] The communication bus 502 can be used to transfer information between the above components.
[0132] The memory 503 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or other types of dynamic storage devices that can store information and instructions. It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 503 can exist independently and be connected to the processor 501 through the communication bus 502. The memory 503 can also be integrated with the processor 501.
[0133] Among them, the memory 503 is used to store the program code for executing the solution of this application and is controlled by the processor 501 to execute. The processor 501 is used to execute the program code stored in the memory 503. The program code can include one or more software modules. The dynamic parameter query method in the above embodiments can be implemented by one or more software modules in the processor 501 and the program code in the memory 503.
[0134] The communication interface 504 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0135] In a specific implementation, as an embodiment, the computer device can include multiple processors, and each of these processors can be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0136] The computer device described above can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer device can be a desktop computer, a laptop computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of the present application do not limit the type of the computer device.
[0137] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-described dynamic parameter query method is implemented.
[0138] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0139] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. If these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A dynamic parameter query method, characterized in that: The steps include: Get the query request uploaded by the target user on the user side of the report designer; Extract query configuration information of each business data in the report designer according to the query request, and determine a neighborhood anchor point of query configuration information in adjacent business data through the query configuration information of all business data; Determine a query index table of the database of the report designer when it is static, perform hierarchical fusion on the query index table to obtain query index values of different query logic layers, and determine the query logic items of the database of the report designer when it is static according to the neighborhood anchor point and all query index values; Acquire a dynamic data segment of the database of the report designer when it is dynamic, determine a query condition at a dynamic time node when querying according to the dynamic data segment, and determine a query trap of the database of the report designer when it is dynamic according to the neighborhood anchor point and the query condition; Determine the query cost of dynamic parameter query according to the query logic item and the query trapdoor, and determine the target query result of the dynamic parameter in the report designer according to the query cost; The neighborhood anchor point represents a connection point or a key parameter between adjacent business data. The neighborhood anchor point for querying configuration information in adjacent business data is determined by querying configuration information of all business data and specifically includes: Determine the configuration feature quantity in the query configuration information of all business data; Determine the mutual proximity similarity in the query configuration information of the adjacent service data according to all configuration feature quantities; Determine a neighborhood anchor point in the query configuration information of the adjacent service data according to the mutual proximity similarity; The query logic item represents a logical unit or identifier that describes and manages the query processing priority, execution order, and related operations in a dynamic parameter query. The query logic item of the database of the report designer in a static state is determined according to the neighborhood anchor point and all query index values, and specifically includes: Determining a query priority value based on the neighborhood anchor point and all query index values; Determine the query logic characteristics of the report designer's database when it is static; The query logic items of the database of the report designer when it is static are determined according to the query priority value and the query logic characteristics.
2. The method according to claim 1, characterized in that Extracting query configuration information of each business data in the report designer according to the query request specifically includes: Parsing the query request to obtain multiple query configuration items; Classify the business data in the report designer according to all query configuration items to obtain the query configuration information of each business data.
3. The method according to claim 1, characterized in that Determine the query index table of the report designer's database when it is static, including: Get the business data collection of the report designer's database when it is static; Determine multiple query index quantities according to the business data set; Determine the query index table of the report designer's database at static time based on the amount of all query indexes.
4. The method according to claim 1, characterized in that The query index table is hierarchically merged to obtain query index values of different query logic layers, specifically including: Determine valid query features in the query index table; Extracting query logic information from the effective query features; All query logic information is processed in a hierarchical manner to obtain hierarchical query index degrees; All query index degrees of each level are connected to obtain query index values of different query logic layers.
5. The method according to claim 1, characterized in that Determining the query conditions at the dynamic time node during query according to the dynamic data segment specifically includes: Mapping the query data in the dynamic data segment to a configuration target location during dynamic parameter query; Determine the amount of configuration query optimization at dynamic time nodes during query; Generate query conditions at dynamic time nodes during querying according to the configured target position and the configured query optimization amount.
6. A dynamic parameter query system, which uses the method described in any one of claims 1 to 5 to perform dynamic parameter query, characterized in that: The system includes: The acquisition module is used to acquire the query request uploaded by the target user on the user end of the report designer; A processing module, configured to extract query configuration information of each business data in the report designer according to the query request, and determine a neighborhood anchor point of query configuration information in adjacent business data through the query configuration information of all business data; The processing module is further used to determine the query index table of the database of the report designer when it is static, perform hierarchical fusion on the query index table to obtain query index values of different query logic layers, and determine the query logic items of the database of the report designer when it is static according to the neighborhood anchor point and all query index values; The processing module is further used to obtain a dynamic data segment of the database of the report designer when it is dynamic, determine a query condition at a dynamic time node when querying according to the dynamic data segment, and determine a query trap of the database of the report designer when it is dynamic according to the neighborhood anchor point and the query condition; The execution module is used to determine the query cost of dynamic parameter query according to the query logic item and the query trapdoor, and determine the target query result of the dynamic parameter in the report designer according to the query cost.
7. A report designer, characterized in that: Including the dynamic parameter query system described in claim 6.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the dynamic parameter query method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method, device and system for rapidly searching ciphertext
CN101593196A
Searchable encryption method for e-commerce platform data privacy protection
CN112272188A