CN117725114A - Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration - Google Patents

Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration Download PDF

Info

Publication number
CN117725114A
CN117725114A CN202311745679.2A CN202311745679A CN117725114A CN 117725114 A CN117725114 A CN 117725114A CN 202311745679 A CN202311745679 A CN 202311745679A CN 117725114 A CN117725114 A CN 117725114A
Authority
CN
China
Prior art keywords
query
strategy
template
policy
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311745679.2A
Other languages
Chinese (zh)
Inventor
陈德勇
朱俊
李开文
陈星壮
邓蕾
徐春花
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CETC 30 Research Institute
Original Assignee
CETC 30 Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CETC 30 Research Institute filed Critical CETC 30 Research Institute
Priority to CN202311745679.2A priority Critical patent/CN117725114A/en
Publication of CN117725114A publication Critical patent/CN117725114A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration, which comprises the following steps: classifying all the queriable information and query conditions in the system, and then realizing the query strategy of each classification; providing a visual query template generating tool, loading all query strategies in the strategy configuration file, enabling a user to perform query strategy combination according to requirements, and storing the combination result as a query template; using the query template to query information, sequentially executing the designated query strategies in the query template by the service program, and returning a query result; traversing the query result according to the appointed display requirement, and performing visual presentation. The invention reduces the engineering realization difficulty and enhances the reusability; the users can organize the inquiry process by themselves, so that different inquiry requirements can be met easily; when the new query content and the query condition are added, the new query process is only needed to be realized, the modification of the existing program is not needed, and the program upgrading maintenance capability is improved.

Description

Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration
Technical Field
The invention relates to the technical field of information statistical query, in particular to a multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration.
Background
In various application and management systems, information statistical query is an important component of the function of the information statistical query, and is a means for assisting a user in managing the system. All current systems can realize basic data query, and finally only stay in the aspect of data simple summary formatting display, and only provide convenience for data query. However, for system operation and maintenance management personnel and professional data analysis personnel, multi-condition and multi-dimensional secondary processing is needed to be carried out on the queried data, so that the accuracy of data statistics and analysis is improved, the working complexity is reduced, and the working efficiency is improved. The multi-condition is that the screening, filtering and intercepting operation is carried out on the business data through a plurality of conditions; the multi-dimension, i.e. multiple angles, can enable different users to obtain the query result from the angles required by the users. Some current large management systems generally conduct data statistics analysis by means of third-party professional data statistics analysis software, but the use of professional software tends to increase software deployment cost and development difficulty. Therefore, a lightweight system information statistical query method is needed to be designed, so that the requirement of a user for multi-condition multi-dimensional statistical query on system information is easily met, the system design is convenient to realize, and the system deployment cost is reduced.
Disclosure of Invention
The invention aims to provide a multi-condition multi-dimensional information statistical query method capable of being dynamically configured based on a strategy, so as to solve the problems of diversified and complicated information statistical query requirements, high system development and deployment cost and the like.
The invention provides a multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration, which comprises the following steps:
s1, classifying all the inquireable information and inquiry conditions in the system, and then realizing inquiry strategies of each classification;
s2, providing a visual query template generation tool, loading all query strategies in the strategy configuration file, enabling a user to perform query strategy combination according to requirements, and storing the combination result as a query template;
s3, using the query template to query information, sequentially executing the designated query strategies in the query template by the service program, organizing the query results in a multi-way tree form, and returning the query results;
and S4, traversing the query result according to the appointed display requirement, and performing visual presentation.
Further, step S1 includes the following sub-steps:
s11, classifying all the inquireable information and inquiry conditions in the system by a system developer, and ensuring that each classification only contains one inquiry information or inquiry condition;
s12, realizing the query process of each category to form a series of independently executable query strategies;
and S13, carrying out strategy numbering, strategy attribute adding, strategy relation setting and sequencing on the query strategy, and finally storing the query strategy as a query strategy configuration file in an XML format.
Further, in step S13, the policy attribute includes a policy number, a policy name, a policy parameter, a query result display flag, a policy validation flag, a result display name, a display width, and a policy dependency relationship, where the policy parameter is a selectable item; the strategy relation is used for setting whether the query process of the query strategy depends on the query results of other query strategies; the sorting is performed according to the policy dependency relationship, the dependents are arranged in front of the dependents, and the dependents are arranged in front of the dependents without any dependency relationship.
Further, step S2 includes the following sub-steps:
s21, the system provides a visual query template generating tool, and all query strategies in the query strategy configuration file are loaded in a graphical or option menu mode;
s22, carrying out query strategy combination according to the query requirement, wherein the visual query template generation tool checks the correctness of the query strategy combination according to the strategy relation of the strategy configuration file, and prompts to carry out query strategy combination again if the requirements are not met;
s23, the visual query template generating tool stores the visual query template as a query template according to the sequence and the format in the query policy configuration file according to the selected query policy, and stores the options and the parameter information input in the query policy combination process into the query template according to the query policy format requirement.
Further, multiple query templates may be generated as desired.
Further, the system may preset commonly used query templates.
Further, step S3 includes the following sub-steps:
s31, a user selects a query template through a client and delivers the query template to a server for information query;
s32, the server calculates the hash value of the query template and compares the hash value with the hash value of the last query template of the user so as to judge whether the query template is changed or not;
s33, if the query template is unchanged, obtaining a query result from the result cache, and returning the query result to the client in a multi-way tree form in a josn format, wherein the query flow is ended;
s34, if the query template changes, all query strategies are sequentially executed, query results are stored in a multi-way tree form, an empty root node is used as a father node of a first query result, the first query result is used as a father node of a second query result, and the like; if a plurality of query results are generated when one query strategy is executed, all the query results are stored under the previous query result node, and each query result is used as a father node to circularly execute the subsequent query strategy;
s35, the server updates a result cache according to the query result and updates the hash value of the query template of the user;
s36, the server returns the query result to the client in a multi-way tree form in a josn format.
Further, step S4 includes the following sub-steps:
s41, the client acquires information from the query result through a plurality of traversal modes including preamble, middling, follow-up and/or breadth-first according to the display mode appointed in the query template;
and S42, visually presenting the acquired information in the form of a pie chart, a bar chart and/or a report.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows:
1. the invention reduces the engineering realization difficulty through strategic in the query process, enhances the reusability of the software, and enables the universal query strategy to be multiplexed among projects;
2. according to the invention, the query process is refined through the query strategy, so that the user can organize the query process by himself, and different query requirements of the user can be satisfied easily;
3. when the new query content and the query condition are added, the new query process is only needed to be realized, the modification of the existing program is not needed, and the program upgrading maintenance capability is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description will briefly describe the drawings in the embodiments, it being understood that the following drawings only illustrate some embodiments of the present invention and should not be considered as limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for statistical query of multi-conditional multidimensional information based on policy dynamically configurable in the practice of the present invention.
FIG. 2 is a flow chart of generating a query strategy in the practice of the present invention.
FIG. 3 is a flow chart of generating a query template in the practice of the present invention.
FIG. 4 is a flow chart of information query in the practice of the present invention.
FIG. 5 is a flow chart showing the results of a query in the practice of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples
As shown in fig. 1, the present embodiment provides a multi-condition multi-dimensional information statistical query method based on policy dynamic configuration, which includes the following steps:
s1, classifying all the inquireable information and inquiry conditions in the system, and then realizing inquiry strategies of each classification; as shown in fig. 2, the method specifically comprises the following substeps:
s11, classifying all the inquireable information and inquiry conditions in the system by a system developer, and ensuring that each classification only contains one type of inquiry information (different angles of the same type of information are different classifications) or inquiry conditions;
s12, realizing the query process of each category to form a series of independently executable query strategies;
and S13, carrying out strategy numbering, strategy attribute adding, strategy relation setting and sequencing on the query strategy, and finally storing the query strategy as a query strategy configuration file in an XML format. Wherein:
the strategy attribute comprises a strategy number, a strategy name, a strategy parameter, a query result display mark, a strategy effective mark, a result display name, a display width and a strategy dependency relation, wherein the strategy parameter is a selectable item;
the strategy relation is used for setting whether the query process of the query strategy depends on the query results of other query strategies;
the sorting is performed according to the policy dependency relationship, the dependents are arranged in front of the dependents, and the dependents are arranged in front of the dependents without any dependency relationship.
The engineering implementation difficulty can be reduced, the program reusability and the expandability can be enhanced by strategically configuring the query process, the complex query requirement is subdivided into a series of independent query strategies, each query strategy only completes one query task, and the program implementation difficulty is greatly reduced; some general query strategies may be common among the various items; when the query content is newly added, only the query strategy is needed to be added, and the existing query strategy is not needed to be changed.
S2, providing a visual query template generation tool, loading all query strategies in the strategy configuration file, enabling a user to perform query strategy combination according to requirements, and storing the combination result as a query template; as shown in fig. 3, the method specifically comprises the following substeps:
s21, the system provides a visual query template generating tool, and all query strategies in the query strategy configuration file are loaded in a graphical or option menu mode;
s22, carrying out query strategy combination according to the query requirement, wherein the visual query template generation tool checks the correctness of the query strategy combination according to the strategy relation of the strategy configuration file, and prompts to carry out query strategy combination again if the requirements are not met;
s23, the visual query template generating tool stores the visual query template as a query template according to the sequence and the format in the query policy configuration file according to the selected query policy, and stores the options and the parameter information input in the query policy combination process into the query template according to the query policy format requirement.
In particular, a user may generate multiple query templates as desired. The system may preset a common query template. The common query templates and the user-defined query templates are preset, so that the query requirements of different users can be well met while the usability of the system is not reduced, and the user can automatically adjust the query templates when the query requirements change.
S3, using the query template to query information, sequentially executing the designated query strategies in the query template by the service program, organizing the query results in a multi-way tree form, and returning the query results; as shown in fig. 4, the method specifically comprises the following substeps:
s31, a user selects a query template through a client and delivers the query template to a server for information query;
s32, the server calculates the hash value of the query template and compares the hash value with the hash value of the last query template of the user so as to judge whether the query template is changed or not;
s33, if the query template is unchanged, obtaining a query result from the result cache, and returning the query result to the client in a multi-way tree form in a josn format, wherein the query flow is ended; by introducing the query result caching technology, repeated query operation can be reduced, and the query response speed of the system is improved;
s34, if the query template changes, all query strategies are sequentially executed, query results are stored in a multi-way tree form, an empty root node is used as a father node of a first query result, the first query result is used as a father node of a second query result, and the like; if a plurality of query results are generated when one query strategy is executed, all the query results are stored under the previous query result node, and each query result is used as a father node to circularly execute the subsequent query strategy;
s35, the server updates a result cache according to the query result and updates the hash value of the query template of the user;
s36, the server returns the query result to the client in a multi-way tree form in a josn format.
S4, traversing the query result according to the appointed display requirement, and performing visual presentation; as shown in fig. 5, the method specifically comprises the following substeps:
s41, the client acquires information from the query result through a plurality of traversal modes including preamble, middling, follow-up and/or breadth-first according to the display mode appointed in the query template;
and S42, visually presenting the acquired information in the form of a pie chart, a bar chart and/or a report. The query result is separated from the query display, so that the display mode of the system can be arbitrarily increased without affecting the data query logic of the server.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration is characterized by comprising the following steps:
s1, classifying all the inquireable information and inquiry conditions in the system, and then realizing inquiry strategies of each classification;
s2, providing a visual query template generation tool, loading all query strategies in the strategy configuration file, enabling a user to perform query strategy combination according to requirements, and storing the combination result as a query template;
s3, using the query template to query information, sequentially executing the designated query strategies in the query template by the service program, organizing the query results in a multi-way tree form, and returning the query results;
and S4, traversing the query result according to the appointed display requirement, and performing visual presentation.
2. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method as recited in claim 1, wherein step S1 comprises the sub-steps of:
s11, classifying all the inquireable information and inquiry conditions in the system by a system developer, and ensuring that each classification only contains one inquiry information or inquiry condition;
s12, realizing the query process of each category to form a series of independently executable query strategies;
and S13, carrying out strategy numbering, strategy attribute adding, strategy relation setting and sequencing on the query strategy, and finally storing the query strategy as a query strategy configuration file in an XML format.
3. The method according to claim 2, wherein in step S13, the policy attributes include a policy number, a policy name, a policy parameter, a query result display flag, a policy validation flag, a result display name, a display width, and a policy dependency, and the policy parameter is an optional item; the strategy relation is used for setting whether the query process of the query strategy depends on the query results of other query strategies; the sorting is performed according to the policy dependency relationship, the dependents are arranged in front of the dependents, and the dependents are arranged in front of the dependents without any dependency relationship.
4. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method as recited in claim 2, wherein step S2 comprises the sub-steps of:
s21, the system provides a visual query template generating tool, and all query strategies in the query strategy configuration file are loaded in a graphical or option menu mode;
s22, carrying out query strategy combination according to the query requirement, wherein the visual query template generation tool checks the correctness of the query strategy combination according to the strategy relation of the strategy configuration file, and prompts to carry out query strategy combination again if the requirements are not met;
s23, the visual query template generating tool stores the visual query template as a query template according to the sequence and the format in the query policy configuration file according to the selected query policy, and stores the options and the parameter information input in the query policy combination process into the query template according to the query policy format requirement.
5. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method of claim 4, wherein a plurality of query templates are generated as needed.
6. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method as recited in claim 4, wherein the system is capable of presetting a common query template.
7. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method as recited in claim 4, wherein step S3 comprises the sub-steps of:
s31, a user selects a query template through a client and delivers the query template to a server for information query;
s32, the server calculates the hash value of the query template and compares the hash value with the hash value of the last query template of the user so as to judge whether the query template is changed or not;
s33, if the query template is unchanged, obtaining a query result from the result cache, and returning the query result to the client in a multi-way tree form in a josn format, wherein the query flow is ended;
s34, if the query template changes, all query strategies are sequentially executed, query results are stored in a multi-way tree form, an empty root node is used as a father node of a first query result, the first query result is used as a father node of a second query result, and the like; if a plurality of query results are generated when one query strategy is executed, all the query results are stored under the previous query result node, and each query result is used as a father node to circularly execute the subsequent query strategy;
s35, the server updates a result cache according to the query result and updates the hash value of the query template of the user;
s36, the server returns the query result to the client in a multi-way tree form in a josn format.
8. The policy-based dynamically configurable multi-conditional multidimensional information statistical query method as recited in claim 7, wherein step S4 comprises the sub-steps of:
s41, the client acquires information from the query result through a plurality of traversal modes including preamble, middling, follow-up and/or breadth-first according to the display mode appointed in the query template;
and S42, visually presenting the acquired information in the form of a pie chart, a bar chart and/or a report.
CN202311745679.2A 2023-12-18 2023-12-18 Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration Pending CN117725114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311745679.2A CN117725114A (en) 2023-12-18 2023-12-18 Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311745679.2A CN117725114A (en) 2023-12-18 2023-12-18 Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration

Publications (1)

Publication Number Publication Date
CN117725114A true CN117725114A (en) 2024-03-19

Family

ID=90204852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311745679.2A Pending CN117725114A (en) 2023-12-18 2023-12-18 Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration

Country Status (1)

Country Link
CN (1) CN117725114A (en)

Similar Documents

Publication Publication Date Title
CN106528129B (en) A kind of Web application interface generation system and method
US10558651B2 (en) Search point management
US20240078096A1 (en) Systems and methods for code clustering analysis and transformation
US11188319B2 (en) Systems and methods for entry point-based code analysis and transformation
CN106951430B (en) Account table query method and device
US10331635B2 (en) Adapting data quality rules based upon user application requirements
US7363315B2 (en) Creating, editing, and displaying hierarchical data structures associated with data in a data source
EP3107050A1 (en) System for data aggregation and report generation
AU2018260813A2 (en) Building applications for configuring processes
CN109002334B (en) Operation and maintenance platform and data processing method thereof
JP2017201547A (en) Automatic report generation method
US10635408B2 (en) Method and apparatus for enabling agile development of services in cloud computing and traditional environments
US10448227B2 (en) Mobile database access application development system and method
CN103020158A (en) Report form creation method, device and system
US20220318310A1 (en) Template-based faceted search experience
US9652203B1 (en) Application development framework using configurable data types
CN104615602A (en) Automatic generation device and method thereof for query interface
CN109033157B (en) Complex data retrieval method and system based on user-defined search condition tree
CN108121579B (en) Method and device for modifying rule file
CN113032633A (en) Method for customizing table by using reference data item
CN117725114A (en) Multi-condition multi-dimensional information statistical query method based on strategy dynamic configuration
CN115510361A (en) Data chart page generation method based on visual configuration and related equipment
US10268730B2 (en) Focus-driven user interface
CN117909734A (en) Label generating apparatus, label generating method, electronic device, and computer-readable storage medium
CN112527859A (en) Flexible configuration management method based on business object

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination