Multi-condition multi-dimension information statistical query method based on policy dynamic configuration

CN117725114BActive Publication Date: 2026-10-27NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311745679.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2026-10-27
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

[0003]本发明旨在提供一种基于策略可动态配置的多条件多维度信息统计查询方法,以解决信息统计查询需求多元化、复杂化、系统开发部署成本高等问题

Benefits of technology

[0031]1、本发明通过查询过程策略化降低工程实现难度,同时增强软件的复用性,通用查询策略可在项目间复用;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725114B_ABST
    Figure CN117725114B_ABST
Patent Text Reader

Abstract

The application provides a kind of multi-condition multi-dimension information statistical query method based on strategy dynamically configurable, comprising: all the information and query conditions in the system can be queried are classified, then the query strategy of each classification is realized;A visual query template generation tool is provided, all the query strategies in the strategy configuration file are loaded, the user combines the query strategy according to the demand, and the combination result is saved as a query template;Information query is carried out using the query template, the service program executes the query strategy specified in the query template in turn, and returns the query result;According to the specified display requirements, the query result is traversed and visually presented.The application reduces the difficulty of engineering implementation, while enhancing reusability;It also allows users to organize the query process themselves, easily meet different query requirements;When there are new query contents and query conditions, only the new query process needs to be implemented, without modifying the existing program, improving the program upgrade and maintenance capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information statistics and query technology, and more specifically, to a multi-condition, multi-dimensional information statistics and query method based on a strategy that can be dynamically configured. Background Technology

[0002] Information statistics and querying are crucial components of various applications and management systems, serving as a means to assist users in system management. Currently, all systems can perform basic data queries, ultimately only offering convenience in data retrieval through simple summarization and formatted display. However, system administrators and professional data analysts require further processing of the queried data using multiple conditions and dimensions to improve the accuracy of statistical analysis, reduce complexity, and increase efficiency. "Multiple conditions" refers to filtering, selecting, and extracting data based on various criteria; "multiple dimensions" refers to multiple perspectives, allowing different users to obtain query results from their specific needs. Currently, many large management systems rely on third-party professional data statistical analysis software, but using specialized software increases deployment costs and development complexity. Therefore, a lightweight system information statistics and querying method is needed that easily meets users' needs for multi-condition, multi-dimensional statistical queries of system information, while also facilitating system design and implementation and reducing deployment costs. Summary of the Invention

[0003] This invention aims to provide a strategy-based, dynamically configurable, multi-condition, and multi-dimensional information statistical query method to address the problems of diversified and complex information statistical query needs and high system development and deployment costs.

[0004] This invention provides a strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method, comprising the following steps:

[0005] S1, classify all queryable information and query conditions in the system, and then implement the query strategy for each category;

[0006] S2 provides a visual query template generation tool that loads all query strategies in the strategy configuration file, allowing users to combine query strategies according to their needs and save the combination results as a query template.

[0007] S3 uses a query template to query information. The service program executes the query strategy specified in the query template in sequence, organizes the query results in the form of a multi-branch tree, and returns the query results.

[0008] S4 iterates through the query results according to the specified display requirements and presents them visually.

[0009] Furthermore, step S1 includes the following sub-steps:

[0010] S11, The system developers categorize all queryable information and query conditions in the system to ensure that each category contains only one type of query information or query condition.

[0011] S12, implement the query process for each category, forming a series of independently executable query strategies;

[0012] S13: Number the query strategy, add strategy attributes, set strategy relationships and sort them, and finally save it as a query strategy configuration file in XML format.

[0013] Furthermore, in step S13, the strategy attributes include strategy number, strategy name, strategy parameters, query result display flag, strategy activation flag, result display name, display width, and strategy dependency relationship, wherein the strategy parameters are optional; the strategy relationship is used to set whether the query process of this query strategy depends on the query results of other query strategies; the sorting is based on the strategy dependency relationship, with the dependent one ranked before the dependent one, and those without any dependency relationship ranked first.

[0014] Furthermore, step S2 includes the following sub-steps:

[0015] S21, the system provides a visual query template generation tool to load all query strategies in the query strategy configuration file in a graphical or option menu manner;

[0016] S22, Query strategy combination is performed according to query requirements. The visual query template generation tool checks the correctness of the query strategy combination according to the strategy relationship in the strategy configuration file. If the requirements are not met, the tool prompts the user to re-combine the query strategy.

[0017] S23, the visual query template generation tool saves the selected query strategy as a query template according to the order and format in the query strategy configuration file, and saves the options and parameter information entered during the query strategy combination process into the query template according to the query strategy format requirements.

[0018] Furthermore, multiple query templates can be generated as needed.

[0019] Furthermore, the system can be pre-configured with commonly used query templates.

[0020] Furthermore, step S3 includes the following sub-steps:

[0021] S31, users select a query template through the client and submit it to the server for information retrieval;

[0022] S32, The server calculates the query template hash value and compares it with the user's previous query template hash value to determine whether the query template has changed;

[0023] S33, if the query template has not changed, retrieve the query results from the result cache and return the query results to the client in the form of a multi-branch tree in JOIN format, and the query process ends;

[0024] S34. If the query template changes, all query strategies are executed in sequence. The query results are stored in the form of a multi-branch tree, with an empty root node as the parent node of the first query result, the first query result as the parent node of the second query result, and so on. If a query strategy generates multiple query results, all query results are stored under the previous query result node, and subsequent query strategies are executed in a loop with each query result as the parent node.

[0025] S35, the server updates the result cache based on the query results and updates the query template hash value for the user;

[0026] S36, the server returns the query results to the client in JOIN format as a multi-branch tree.

[0027] Furthermore, step S4 includes the following sub-steps:

[0028] S41, the client retrieves information from the query results using various traversal methods, including preorder, inorder, postorder, and / or breadth-first, according to the display method specified in the query template;

[0029] S42, visualize the acquired information in the form of pie charts, bar charts and / or reports.

[0030] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0031] 1. This invention reduces the difficulty of engineering implementation by strategizing the query process, while enhancing the reusability of the software. The general query strategy can be reused across projects.

[0032] 2. This invention refines the query process through query strategies, allowing users to organize their own query process and easily meet the different query needs of different users;

[0033] 3. When new query content and query conditions are added, only the new query process needs to be implemented, without modifying the existing program, thus improving the program's upgrade and maintenance capabilities. Attached Figure Description

[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a flowchart of a strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method implemented in this invention.

[0036] Figure 2 This is a flowchart illustrating the query strategy generation process in the implementation of this invention.

[0037] Figure 3 This is a flowchart illustrating the generation of a query template in the implementation of this invention.

[0038] Figure 4 This is a flowchart of information query in the implementation of the present invention.

[0039] Figure 5 This is a flowchart illustrating the display of query results in an embodiment of the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0041] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0042] Example

[0043] like Figure 1 As shown in the figure, this embodiment proposes a multi-condition, multi-dimensional information statistical query method based on dynamically configurable strategies, including the following steps:

[0044] S1 categorizes all searchable information and query conditions in the system, and then implements a query strategy for each category; for example... Figure 2 As shown, the specific steps include the following:

[0045] S11, the system developers categorize all queryable information and query conditions in the system to ensure that each category contains only one type of query information (different perspectives on the same information constitute different categories) or query conditions.

[0046] S12, implement the query process for each category, forming a series of independently executable query strategies;

[0047] S13 involves assigning strategy numbers, adding strategy attributes, setting strategy relationships, and sorting the query strategies. Finally, the query strategy configuration file is saved in XML format. (The following is a partial translation of the original text:)

[0048] The strategy attributes include strategy number, strategy name, strategy parameters, query result display flag, strategy activation flag, result display name, display width, and strategy dependencies. Among these, the strategy parameters are optional.

[0049] The strategy relationship is used to determine whether the query process of this query strategy depends on the query results of other query strategies;

[0050] The sorting is based on policy dependencies, with dependents listed before dependents, and those with no dependencies listed first.

[0051] By strategizing the query process, the difficulty of engineering implementation can be reduced, the reusability and scalability of the program can be enhanced, and complex query requirements can be subdivided into a series of independent query strategies. Each query strategy only completes one query task, which greatly reduces the difficulty of program implementation. Some general query strategies can be used in various projects. When adding new query content, only the new query strategy needs to be added, without modifying the existing query strategies.

[0052] S2 provides a visual query template generation tool that loads all query strategies from the strategy configuration file, allowing users to combine query strategies according to their needs and save the combined results as query templates; for example... Figure 3 As shown, the specific steps include the following:

[0053] S21, the system provides a visual query template generation tool to load all query strategies in the query strategy configuration file in a graphical or option menu manner;

[0054] S22, Query strategy combination is performed according to query requirements. The visual query template generation tool checks the correctness of the query strategy combination according to the strategy relationship in the strategy configuration file. If the requirements are not met, the tool prompts the user to re-combine the query strategy.

[0055] S23, the visual query template generation tool saves the selected query strategy as a query template according to the order and format in the query strategy configuration file, and saves the options and parameter information entered during the query strategy combination process into the query template according to the query strategy format requirements.

[0056] Specifically, users can generate multiple query templates as needed. The system can also preset commonly used query templates. By using preset commonly used query templates and user-defined query templates, the system can effectively meet the query needs of different users without reducing system availability. Users can adjust the query templates themselves when their query needs change.

[0057] S3 uses a query template to retrieve information. The service program sequentially executes the query strategy specified in the query template, organizes the query results in a multi-branch tree format, and returns the results; for example... Figure 4 As shown, the specific steps include the following:

[0058] S31, users select a query template through the client and submit it to the server for information retrieval;

[0059] S32, The server calculates the query template hash value and compares it with the user's previous query template hash value to determine whether the query template has changed;

[0060] S33, if the query template has not changed, the query results are retrieved from the result cache and returned to the client in JOIN format as a multi-branch tree, and the query process ends; the introduction of query result caching technology can reduce repeated query operations and improve the system query response speed;

[0061] S34. If the query template changes, all query strategies are executed in sequence. The query results are stored in the form of a multi-branch tree, with an empty root node as the parent node of the first query result, the first query result as the parent node of the second query result, and so on. If a query strategy generates multiple query results, all query results are stored under the previous query result node, and subsequent query strategies are executed in a loop with each query result as the parent node.

[0062] S35, the server updates the result cache based on the query results and updates the query template hash value for the user;

[0063] S36, the server returns the query results to the client in JOIN format as a multi-branch tree.

[0064] S4, iterate through the query results according to the specified display requirements and present them visually; such as Figure 5 As shown, the specific steps include the following:

[0065] S41, the client retrieves information from the query results using various traversal methods, including preorder, inorder, postorder, and / or breadth-first, according to the display method specified in the query template;

[0066] S42 visualizes the acquired information in the form of pie charts, bar charts, and / or reports. The separation of query results and query display allows the system to add display methods arbitrarily without affecting the server-side data query logic.

[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method, characterized in that, Includes the following steps: S1 categorizes all searchable information and query conditions in the system, and then implements a query strategy for each category: S11, The system developers categorize all queryable information and query conditions in the system to ensure that each category contains only one type of query information or query condition. S12, implement the query process for each category, forming a series of independently executable query strategies; S13, assign strategy numbers, add strategy attributes, set strategy relationships, and sort the query strategies, finally saving them as a query strategy configuration file in XML format; the strategy attributes include strategy number, strategy name, strategy parameters, query result display flag, strategy activation flag, result display name, display width, and strategy dependency relationship, wherein the strategy parameters are optional; the strategy relationship is used to set whether the query process of this query strategy depends on the query results of other query strategies; the sorting is based on the strategy dependency relationship, with the dependent strategy listed before the dependent strategy, and strategies without any dependency relationship listed first; S2 provides a visual query template generation tool that loads all query strategies in the strategy configuration file, allowing users to combine query strategies according to their needs and save the combination results as a query template. S3 uses a query template to query information. The service program executes the query strategies specified in the query template in sequence, organizes the query results in the form of a multi-branch tree, and returns the query results. The query results are stored in the form of a multi-branch tree, with an empty root node as the parent node of the first query result, the first query result as the parent node of the second query result, and so on. If a query strategy generates multiple query results, all query results are stored under the previous query result node, and subsequent query strategies are executed in a loop with each query result as the parent node. S4 iterates through the query results according to the specified display requirements and presents them visually.

2. The strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method according to claim 1, characterized in that, Step S2 includes the following sub-steps: S21, the system provides a visual query template generation tool to load all query strategies in the query strategy configuration file in a graphical or option menu manner; S22, Query strategy combination is performed according to query requirements. The visual query template generation tool checks the correctness of the query strategy combination according to the strategy relationship in the strategy configuration file. If the requirements are not met, the tool prompts the user to re-combine the query strategy. S23, the visual query template generation tool saves the selected query strategy as a query template according to the order and format in the query strategy configuration file, and saves the options and parameter information entered during the query strategy combination process into the query template according to the query strategy format requirements.

3. The strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method according to claim 2, characterized in that, Multiple query templates can be generated as needed.

4. The strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method according to claim 2, characterized in that, The system can be pre-configured with commonly used query templates.

5. The strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method according to claim 2, characterized in that, Step S3 includes the following sub-steps: S31, users select a query template through the client and submit it to the server for information retrieval; S32, The server calculates the query template hash value and compares it with the user's previous query template hash value to determine whether the query template has changed; S33, if the query template has not changed, retrieve the query results from the result cache and return the query results to the client in the form of a multi-branch tree in JOIN format, and the query process ends; S34. If the query template changes, all query strategies are executed in sequence, and the query results are stored in the form of a multi-branch tree. S35, the server updates the result cache based on the query results and updates the query template hash value for the user; S36, the server returns the query results to the client in JOIN format as a multi-branch tree.

6. The strategy-based, dynamically configurable, multi-condition, multi-dimensional information statistical query method according to claim 5, characterized in that, Step S4 includes the following sub-steps: S41, the client retrieves information from the query results using various traversal methods, including preorder, inorder, postorder, and / or breadth-first, according to the display method specified in the query template; S42, visualize the acquired information in the form of pie charts, bar charts and / or reports.

Citation Information

Patent Citations

  • A dynamic report generation method and system based on a data model

    CN109669949A

  • A method and a device for displaying information

    CN109710122A

  • Query method based on result set query cache in openGauss database

    CN116595056A