Search

CN-116383169-B - Data index statistical method and system based on database configuration and electronic equipment

CN116383169BCN 116383169 BCN116383169 BCN 116383169BCN-116383169-B

Abstract

The invention provides a data index statistical method, a system and electronic equipment based on database configuration, and relates to the technical field of computers, wherein the method comprises the steps of firstly, carrying out index predefining according to service requirements and configuring index basic information to generate an index basic information table; the method comprises the steps of storing index basic information of at least one index, wherein the index basic information comprises a statistical dimension, a statistical mode and a statistical caliber, compiling an index development script based on a development flow specification, acquiring a statistical value of the index according to detailed data of a service, storing the statistical value into an index statistical result table, acquiring the statistical result from the index statistical result table by utilizing a data interface based on index parameters to be checked and the index basic information received in advance, and solving the technical problems of independent development requirement, insufficient expansibility and low development efficiency of the existing scheme by utilizing the method, thereby achieving the technical effect of improving the development efficiency.

Inventors

  • HUANG XIUYING
  • GUI HAO

Assignees

  • 数字浙江技术运营有限公司

Dates

Publication Date
20260512
Application Date
20221230

Claims (9)

  1. 1. A database configuration-based data index statistical method, comprising: the method comprises the steps of carrying out index predefining and configuring index basic information according to service requirements to generate an index basic information table, wherein the index basic information table is used for storing index basic information of at least one index, and the index basic information comprises statistical dimension, statistical mode and statistical caliber; writing an index development script based on the development flow specification, wherein the index development script is used for acquiring the statistical value of an index according to the detail data of the service and storing the statistical value into an index statistical result table; Based on index parameters to be checked and the index basic information received in advance, acquiring a statistical result from the index statistical result table by utilizing a data interface, wherein the method comprises the steps of checking the index to be checked of an input data interface, removing illegal indexes and illegal dimension values according to check rules, splitting the checked indexes into a plurality of groups according to the statistical mode, splicing the groups according to the statistical mode and the corresponding four arithmetic requirements, acquiring the statistical result from the index statistical result table according to the splicing result of each group of the structured query language, and merging the statistical results of a plurality of groups of different statistical modes into a return result in a unified format, wherein for the query of a composite index, the statistical value is acquired by combining the atomic indexes corresponding to the dynamic splicing with the four arithmetic symbols.
  2. 2. The database configuration-based data index statistical method according to claim 1, wherein the step of performing index predefining and configuring index base information according to service demands to generate an index base information table comprises: The method comprises the steps of carrying out standard definition on indexes according to service requirements, and determining index types, wherein the index types comprise atomic indexes and composite indexes; And configuring a statistical dimension, a statistical mode and a statistical caliber according to the index type to generate an index basic information table, wherein the statistical mode comprises a statistical accumulated value or a current updated value.
  3. 3. The database configuration-based data index statistical method according to claim 2, wherein the index statistical result table is used for storing an atomic index, and the atomic index is used for realizing configuration and query of the composite index in combination with the index basic information; the index statistical result table comprises index codes, index names, index numerical values and at least one statistical dimension.
  4. 4. The database configuration-based data index statistical method according to claim 1, wherein before the step of obtaining a statistical result from the index statistical result table using a data interface based on index parameters to be checked received in advance and the index base information, the method further comprises: Inputting index parameters to be checked according to the service demand, wherein the index parameters to be checked comprise indexes to be checked, statistical dimension and time interval; And receiving the index parameters to be checked by utilizing a data interface.
  5. 5. The database configuration-based data index statistical method according to claim 1, wherein the verification rule comprises: The index to be checked is configured in the index basic information table and development is completed; The index to be checked supports a predetermined statistical dimension; the statistical dimension supported by the index to be checked accords with a corresponding parameter range.
  6. 6. The database configuration-based data index statistical method according to claim 1, wherein the method further comprises: and generating a chart according to the returned result, and displaying the chart on a front-end page in a visual form.
  7. 7.A database configuration-based data index statistical system, the system comprising: The system comprises a configuration module, a storage module and a processing module, wherein the configuration module is used for carrying out index predefining according to service demands and configuring index basic information to generate an index basic information table, wherein the index basic information table is used for storing index basic information of at least one index, and the index basic information comprises a statistical dimension, a statistical mode and a statistical caliber; The system comprises a script writing module, a rule writing module and a rule writing module, wherein the script writing module is used for writing an index development script based on a development flow specification, and the index development script is used for acquiring the statistic value of an index according to the detailed data of a service and storing the statistic value into an index statistic result table; The statistical result generation module is used for acquiring statistical results from the index statistical result table by utilizing a data interface based on index parameters to be checked and the index basic information received in advance, and comprises the steps of checking the index to be checked of an input data interface, removing illegal indexes and illegal dimension values according to check rules, splitting the checked indexes into a plurality of groups according to the statistical modes, performing structured query language splicing on each group according to the statistical modes and the corresponding four arithmetic demands, acquiring statistical results from the index statistical result table respectively according to the splicing results of each group of structured query languages, and combining the statistical results of a plurality of groups of different statistical modes into a return result in a unified format, wherein for the query of the composite indexes, the atomic indexes corresponding to the dynamic splicing are combined with the four arithmetic symbols to acquire the statistical values through acquiring configuration information of the indexes.
  8. 8. An electronic device comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method of any of the preceding claims 1 to 6.
  9. 9. A computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions, the computer-executable instructions, when invoked and executed by a processor, cause the processor to perform the method of any one of claims 1 to 6.

Description

Data index statistical method and system based on database configuration and electronic equipment Technical Field The present invention relates to the field of computer technologies, and in particular, to a data index statistics method, system, and electronic device based on database configuration. Background Under the large background of digital transformation, the generated data volume of each business system of different units is more and more huge along with the digital popularization of business. In order to effectively promote the optimization of department business, the huge data is not needed, and more importantly, business insights mapped by the data are more important, for example, more indexes such as case number distribution of departments, time, areas and other dimensions, case number distribution of case types and the like can be obtained by analyzing palm case handling data of duty personnel. Through analysis of the indexes, the fields needing important attention can be further obtained, so that important supervision is carried out, and efficient office work of duty personnel is facilitated. At present, the main mode is that data of different topics are stored in different data tables, and technical developers develop customized reports according to business requirements. The scheme mainly has the problems that each data index needs to be independently developed, the expansibility is insufficient and the development efficiency is low. Disclosure of Invention The invention aims to provide a data index statistical method, a system and electronic equipment based on database configuration, so as to solve the technical problems of insufficient data index demand expansibility and low development efficiency in the prior art. In a first aspect, an embodiment of the present invention provides a data index statistics method based on database configuration, where the method includes: The method comprises the steps of carrying out index predefining according to service demands and configuring index basic information to generate an index basic information table, wherein the index basic information table is used for storing index basic information of at least one index, and the index basic information comprises statistical dimension, statistical mode and statistical caliber; The index development script is used for acquiring the statistical value of the index according to the detail data of the service and storing the statistical value into an index statistical result table; And acquiring a statistical result from the index statistical result table by utilizing a data interface based on the index parameter to be checked and the index basic information which are received in advance. In some possible embodiments, the step of predefining the index according to the service requirement and configuring index basic information to generate an index basic information table comprises the steps of defining the index according to the service requirement in a standard mode, determining an index type, wherein the index type comprises an atomic index and a compound index, the compound index is obtained by the atomic index through a four-rule operation mode, configuring a statistical dimension, a statistical mode and a statistical caliber according to the index type, and generating the index basic information table, and the statistical mode comprises a statistical accumulated value or a current updated value. In some possible embodiments, the index statistics table is used for storing atomic indexes, the atomic indexes are used for configuring and inquiring the composite indexes by combining the index basic information, and the index statistics table comprises index codes, index names, index values and at least one statistical dimension. In some possible embodiments, before the step of obtaining the statistical result from the index statistical result table by using the data interface based on the index parameter to be checked and the index basic information received in advance, the method further includes inputting the index parameter to be checked according to the service requirement, wherein the index parameter to be checked includes an index to be checked, a statistical dimension and a time interval, and receiving the index parameter to be checked by using the data interface. In some possible embodiments, based on the index parameters to be checked and the index basic information received in advance, the method for acquiring the statistical result from the index statistical result table by using the data interface comprises the steps of checking the index to be checked of the input data interface, removing illegal indexes and illegal dimension values according to check rules, splitting the checked indexes into a plurality of groups according to the statistical modes, splicing the groups according to the statistical modes and the corresponding four arithmetic requirements, acquiring the statistical result from the inde