Standardized management method and device for enterprise-level index system
By automating the generation of query statements and the calculation of metrics, the problem of high cost and low efficiency in traditional metric calculation has been solved. This has enabled the automatic acquisition of calculated metrics, reducing costs and improving development efficiency.
Patent Information
- Application Number
- CN202411900532.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In existing technologies, the technical problem with enterprise-level metrics is that metric calculations typically use traditional SQL writing methods, resulting in high costs, low development efficiency, chaotic metric management, high maintenance costs, and an inability to view the calculation logic and lineage.
By adopting a device-based approach and adding dimensions based on dimensions, the management of dimensions and metrics is completed. By defining a metric calculation model, the automatic generation and assembly of query statements are achieved. By defining a metric calculation model, the automatic acquisition and calculation of metrics are achieved, thereby reducing costs and improving development efficiency.
It enables automatic acquisition and calculation of atomic metrics, reduces costs and improves development efficiency, simplifies the metric management process, and enhances the automation of metric calculation.
Smart Images

Figure CN120029992B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data management, in particular to a standardized management method and device of an enterprise-level index system. BACKGROUND
[0002] With the advent of the digital economy era and the promulgation of various data management laws and regulations, the mining and use of data value have become increasingly important; at present, the traditional sql (Structured Query Language) writing method is usually used for index calculation, which requires manual writing of sql statements, and has the problems of high cost and slow development efficiency. SUMMARY
[0003] Therefore, it is necessary to provide a standardized management method and device of an enterprise-level index system which can reduce cost and improve development efficiency.
[0004] In a first aspect, the present application provides a standardized management method of an enterprise-level index system, the method comprising:
[0005] Based on the dimension basic information, the dimension addition operation is completed, and the target data is bound with the corresponding dimension according to the dimension type corresponding to the target data; wherein the dimension type includes a normal dimension and a geographic dimension;
[0006] Based on the index basic information, the index addition operation is completed, wherein the index includes a calculation index and an atomic index;
[0007] The calculation field and the dimension field corresponding to the atomic index are obtained respectively, and the query statement is assembled according to the calculation field and the dimension field, the query statement is used to associate and bind the atomic index and the target data corresponding to the calculation field according to the calculation field, and the query statement is also used to associate and bind the atomic index and the dimension corresponding to the dimension field;
[0008] The index calculation model is defined, and the legality of the index calculation model is verified, wherein the index calculation model corresponds to the calculation index, and one index calculation model supports the free combination of multiple atomic indexes and / or multiple calculation indexes;
[0009] When the index calculation model passes the legality verification, the dimension common to all calculation indexes associated with the index calculation model is selected as the target dimension, the calculation statement is assembled according to the target dimension, the index calculation model, and the calculation indexes associated with the index calculation model, the calculation statement is used to load the index calculation model to run according to the preset time interval, and the calculation index corresponding to the index calculation model is obtained; the target dimension is used to represent the dimension corresponding to the index calculation model.
[0010] In one of the embodiments, the target data is bound to the dimension according to the dimension type corresponding to the target data, including:
[0011] When the dimension type corresponding to the target data is a geographic dimension, a classification field corresponding to the target data is obtained, and the target data is bound to the dimension based on the classification field, the classification field including a field used for regional division;
[0012] When the dimension type corresponding to the target data is a normal dimension, the target data is bound to the dimension.
[0013] In one of the embodiments, the query statement is assembled according to the calculation field and the dimension field, including:
[0014] The target data corresponding to the atomic index is determined based on the calculation field, and the dimension corresponding to the atomic index is obtained according to the dimension field;
[0015] The atomic index, the target data corresponding to the atomic index, and the dimension corresponding to the atomic index are connected through the calculation field and the dimension field to assemble the query statement.
[0016] In one of the embodiments, the method further includes:
[0017] The decoration condition is obtained, the decoration condition being used for screening the target data corresponding to the atomic index to determine the specified data;
[0018] The atomic index, the specified data, and the dimension corresponding to the atomic index are connected through the calculation field, the dimension field, and the decoration condition to assemble the query statement.
[0019] In one of the embodiments, the number of target dimensions is one or more; the dimension common to each calculation index associated with the index calculation model is selected as the target dimension, including:
[0020] The business requirement information is obtained, and the target dimension is determined from the dimension common to each calculation index associated with the index calculation model according to the business requirement information.
[0021] In one of the embodiments, the calculation statement is assembled according to the target dimension, the index calculation model, and the calculation index associated with the index calculation model, including:
[0022] The target dimension and the index calculation model are connected through the calculation index associated with the index calculation model to assemble the calculation statement.
[0023] In a second aspect, the application further provides a standardized management device of an enterprise-level index system, the device including:
[0024] The dimension adding module is configured to add a dimension based on dimension basic information, and bind target data with a corresponding dimension according to a dimension type of the target data, wherein the dimension type includes a normal dimension and a geographic dimension.
[0025] The index adding module is configured to add an index based on index basic information, wherein the index includes a calculation index and an atomic index.
[0026] The first statement module is configured to obtain a calculation field and a dimension field corresponding to the atomic index respectively, and assemble a query statement according to the calculation field and the dimension field, wherein the query statement is configured to associate and bind the atomic index with target data corresponding to the calculation field, and the query statement is also configured to associate and bind the atomic index with a dimension corresponding to the dimension field.
[0027] The second statement module is configured to define an index calculation model, and perform a legality check on the index calculation model, wherein the index calculation model corresponds to the calculation index, and one index calculation model supports a plurality of atomic indexes and / or a plurality of calculation indexes.
[0028] The second statement module is also configured to select a dimension common to the calculation indexes associated with the index calculation model as a target dimension when the index calculation model passes the legality check, assemble a calculation statement according to the target dimension, the index calculation model, and the calculation indexes associated with the index calculation model, wherein the calculation statement is configured to load the index calculation model to run according to a preset time interval, and obtain a calculation index corresponding to the index calculation model, and the target dimension is configured to represent a dimension corresponding to the index calculation model.
[0029] In a third aspect, the present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0030] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0031] In a fifth aspect, the present application also provides a computer program product, which comprises a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0032] The standardized management method and device of the enterprise-level index system can automatically obtain atomic indexes by defining calculation fields and dimension fields based on dimension basic information and index basic information, assembling a query statement according to the calculation fields and the dimension fields, and automatically obtaining calculation indexes by defining an index calculation model, selecting a dimension shared by all calculation indexes associated with the index calculation model as a target dimension when the index calculation model passes a legality check, and assembling a calculation statement according to the target dimension, the index calculation model, and the calculation indexes associated with the index calculation model. After the calculation fields and the dimension fields are defined by a user, the query statement can be automatically generated to automatically obtain the atomic indexes. After the index calculation model and the target dimension are defined by the user, the calculation statement can be automatically generated to automatically obtain the calculation indexes. Compared with a traditional method of manually writing an sql statement to calculate indexes, the method realizes automatic assembly of a corresponding query statement, reduces costs, and improves development efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can be obtained without creative labor on the basis of these drawings.
[0034] Figure 1 A flowchart of a standardized management method of an enterprise-level index system in an embodiment;
[0035] Figure 2 A flowchart of dimension creation and data binding in an embodiment;
[0036] Figure 3 A flowchart of index directory management in an embodiment;
[0037] Figure 4 A flowchart of steps of assembling a query statement according to calculation fields and dimension fields in an embodiment;
[0038] Figure 5 A flowchart of steps of assembling a calculation statement according to a target dimension, an index calculation model, and calculation indexes associated with the index calculation model in an embodiment;
[0039] Figure 6 A flowchart of a standardized management method of an enterprise-level index system in another embodiment;
[0040] Figure 7A structural block diagram of a standardized management device for an enterprise-level index system in an embodiment;
[0041] Figure 8 An internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0042] In order to facilitate the understanding of the present application, the present application will be described in more detail below with reference to the relevant drawings. The drawings show embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing specific embodiments of the present application and are not intended to limit the present application.
[0044] It can be understood that the terms "first", "second" and the like used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the other element.
[0045] It can be understood that "connection" in the following embodiments, if the connected circuit, module, unit and the like have the transmission of electrical signal or data between each other, should be understood as "electrically connected", "communication connection" and the like.
[0046] It can be understood that "at least one" means one or more, and "multiple" means two or more. "At least part of the element" means part or all of the element.
[0047] As used herein, the singular forms "a", "an" and "the" can also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "comprise / comprising" or "have / having" specifies the presence of stated features, integers, steps, operations, components, parts, or combinations thereof, but does not exclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in the specification includes any and all combinations of the related listed items.
[0048] Currently, data is an important production factor and a basic strategic resource for enterprises. With the advent of the digital economy era and the promulgation of various data management laws and regulations, the mining and use of data value have become increasingly important. At present, enterprise data management is chaotic, data quality is uneven, and problems such as dark data, island data, and non-unified data standards are serious. Exemplarily, the traditional index system management mode at least includes the following problems: 1) The index management includes the management of the business attribute, technical attribute, and management attribute of the index. However, many enterprises do not develop index data standards. Some enterprises have developed index data standards but have not applied them. Some enterprises use offline documents for management, resulting in chaotic and low-efficiency management; 2) The traditional way of writing sql is often used for index calculation, which requires special technical personnel to write sql statements and complete the calculation of indexes through job configuration. The development efficiency of these index calculations is very low, and it takes about 1-2 days for one person to develop an index, which has the problems of high cost and slow development efficiency; 3) If the dimensions of the current index data need to be added or deleted, the code needs to be modified, the sql statement needs to be rewritten, and then it needs to be put online. That is, the maintenance cost of index data calculation is very high, and the timeliness is low; 4) When the index is maintained offline, the names of the indexes proposed by business personnel may be different, but the business scope is consistent, which leads to repeated indexes, is not conducive to checking, and the index calculation is calculated by technical personnel through the writing of sql statements, which cannot view the calculation logic of the index and the blood relationship of the index calculation.
[0049] The standardized management method of the enterprise-level index system provided by the embodiments of the present application can be applied to a computer device. By using the dimension basic information and the index basic information input by a user, the addition of dimensions and indexes is completed respectively. After the user defines the calculation field and the dimension field, a query statement is automatically generated to automatically obtain an atomic index. After the user defines the index calculation model and the target dimension, a calculation statement is automatically generated to automatically obtain a calculation index. Compared with the traditional method of manually writing sql statements to realize index calculation, the automatic assembly of the corresponding query statement is realized, which reduces the cost and improves the development efficiency.
[0050] In an exemplary embodiment, as shown in Figure 1 A standardized management method of an enterprise-level index system is provided. The method includes the following steps:
[0051] In S102, the addition of dimensions is completed based on the dimension basic information. According to the dimension type corresponding to the target data, the target data is bound to the corresponding dimension. The dimension type includes an ordinary dimension and a geographic dimension.
[0052] The dimension basic information can be set according to actual conditions, and is not limited in the embodiments of the present application.
[0053] Specifically, the user clicks the add dimension function button in the index management page on the computer device, the computer device pops up the dimension adding page, the user inputs the dimension basic information in the dimension adding page, including dimension code, dimension name, dimension type, dimension description, dimension storage table, dimension field (FK), parent dimension field, dimension value name field and classification field, to complete the dimension adding operation, the dimension type includes ordinary dimension and geographic dimension, and in the process of binding the target data and the dimension, the target data is bound to the dimension of the corresponding dimension type according to the dimension type of the target data.
[0054] Exemplarily, Figure 2 Exemplarily, a dimension creation and data binding process schematic diagram is shown, after the user completes the filling of the dimension name, dimension type and dimension description, the creation of the new dimension is completed. The user clicks the bind storage table button to bind the storage table, the dimension storage table is used to represent the selected storage table type (target data), and the storage table type can be a real physical table, a view in the data source or a result set of a sql statement directly written on the platform. The computer device assigns the dimension field and the dimension value name field in the dimension definition based on the dimension basic information, and corresponds to the above target data, that is, the corresponding column in the data table. The computer device assigns the parent dimension field in the dimension definition based on the dimension basic information, and sets the filtering condition to remove the garbage data and invalid data in the target data, to avoid inaccurate index calculation results in the future. After the dimension definition is assigned, the user can click the dimension data viewing button on the page to view the specific dimension data; for example, the company has a department dimension, the user can view all the department information of the company by clicking the dimension data viewing button, including department code, department name, superior department and the like; after the above operation, the adding of a single dimension is completed. We can continue to manage and add other dimensions.
[0055] It should be noted that the user can also modify or delete the dimension, that is, modify and delete the dimension information, which is not described herein.
[0056] S104, based on the index basic information, the index adding operation is completed, wherein the index includes a calculation index and an atomic index.
[0057] The index basic information can be set according to actual conditions, and is not limited in the embodiments of the present application. It should be noted that, in order to facilitate the standardized management of the indexes, the attributes in the index basic information corresponding to each index are the same, for example, each index basic information includes data of business attributes, technical attributes and management attributes of the index. The business attributes can include index name, index directory, index dimension (dimension field), business scope (meaning of the index) and data rolling up (whether the superior dimension needs to be calculated). The technical attributes can include index type (atomic index / calculating index), measurement type (counting, summation, etc.), data type (decimal / integer), processing frequency (daily processing, monthly processing or other), index unit (ten thousand, million or other, for easy viewing), and whether to remove duplicates (whether the data needs to be removed). The management attributes can include responsible department (proposing department of the index) and responsible person (proposer of the index). That is, for each newly added index, the business attributes, technical attributes and management attributes of the index need to be filled in to obtain the index basic information, and the index adding operation is completed by means of the index basic information.
[0058] Specifically, the management of the index directory is completed based on the index basic information, and a new index is added under the corresponding index directory, so as to complete the index adding operation. It should be noted that the atomic index is an index calculated by a physical table, a view or a result set of a sql statement in the data source. The calculating index is an index calculated by public calculation such as addition, subtraction, multiplication and division between atomic indexes or between an atomic index and a constant.
[0059] Exemplarily, the management of the index directory includes operations such as directory adding, directory modifying, directory deleting and directory sorting. The process diagram of the index directory management is shown in FIG. 1. Figure 3 As shown in FIG. 1, the directory adding includes filling in the directory basic information and setting the operation and viewing permission of the directory, so as to complete the directory adding operation. Correspondingly, when the directory is modified, the directory basic information is modified and the operation and viewing permission of the directory is modified, so as to complete the directory modifying operation. The directory sorting is realized by dragging the upper and lower relationship of the directory. When the directory is deleted, a dialog box is popped up to prompt the user whether to confirm the deletion. In the case that the user confirms, the directory deleting operation is completed.
[0060] In S106, the calculating field and the dimension field corresponding to the atomic index respectively are obtained, and a query statement is assembled according to the calculating field and the dimension field. The query statement is used to associate and bind the atomic index and the target data corresponding to the calculating field according to the calculating field, and is also used to associate and bind the atomic index and the dimension corresponding to the dimension field.
[0061] The query statement can be a sql statement, or other statement used to realize association and binding of the atomic index and target data corresponding to the calculation field according to the calculation field, and association and binding of the atomic index and dimension corresponding to the dimension field, which is not limited in the embodiment of the present application.
[0062] Specifically, the data type of the atomic index includes sql, data table and data view. After the user confirms the data type corresponding to the current atomic index, the user sets the calculation field and the dimension field corresponding to the atomic index respectively. The computer device assembles the query statement through the calculation field and the dimension field, so as to realize association and binding of the atomic index and target data corresponding to the calculation field, and association and binding of the atomic index and dimension corresponding to the dimension field.
[0063] S108, defining an index calculation model, and performing legality verification on the index calculation model, wherein the index calculation model corresponds to the calculation index, and one index calculation model supports free combination of multiple atomic indexes and / or multiple calculation indexes.
[0064] Specifically, the calculation index refers to an index calculated through public calculation such as addition, subtraction, multiplication and division between atomic indexes, between an atomic index and a constant, between calculation indexes, between a calculation index and an atomic index, or between a calculation index and a constant. One calculation index corresponds to one index calculation model. The index calculation model includes an index calculation formula, for example, the total amount of charging orders and the number of charging orders are both atomic indexes, and the average order amount needs to be obtained by dividing the total amount of charging orders by the number of charging orders. Therefore, the average order amount is a calculation index. The user completes definition of the index calculation model according to business requirements, and performs legality verification on the index calculation model, for example, judges that the divisor cannot be 0. It should be noted that the way of performing legality verification on the index calculation model can be determined according to actual conditions, which is not limited in the embodiment of the present application.
[0065] S110, when the index calculation model passes the legality verification, selecting a dimension common to each calculation index associated with the index calculation model as a target dimension, assembling a calculation statement according to the target dimension, the index calculation model, and the calculation index associated with the index calculation model, and the calculation statement is used to load the index calculation model to run according to a preset time interval, so as to obtain a calculation index corresponding to the index calculation model; the target dimension is used to represent the dimension corresponding to the index calculation model.
[0066] The calculation statement can be a sql statement, or other statement used to realize loading of the index calculation model to run according to the preset time interval, which is not limited in the embodiment of the present application. The preset time interval can be set according to actual conditions, which is not limited in the embodiment of the present application.
[0067] Specifically, when the index calculation model passes the legality check, a target dimension is selected from dimensions shared by the calculation indicators associated with the index calculation model based on a selection operation of a user, and the computer device assembles a calculation statement according to the target dimension, the index calculation model, and the calculation indicators associated with the index calculation model to realize loading of the index calculation model for running according to a preset time interval and obtaining the calculation indicators corresponding to the index calculation model.
[0068] In the standardized management method of the enterprise-level index system, the addition of dimensions and indicators is respectively completed based on the dimension basic information and the index basic information, the calculation field and the dimension field corresponding to the atomic indicators are obtained, the query statement is assembled according to the calculation field and the dimension field to realize automatic acquisition of the atomic indicators, the index calculation model is defined, and when the index calculation model passes the legality check, the dimensions shared by the calculation indicators associated with the index calculation model are selected as the target dimensions, and the calculation statement is assembled according to the target dimensions, the index calculation model, and the calculation indicators associated with the index calculation model to realize automatic acquisition of the calculation indicators. Compared with the traditional method of manually writing the sql statement to realize the calculation of the indicators, the automatic assembly of the corresponding query statement is realized, the cost is reduced, and the development efficiency is improved.
[0069] In one of the embodiments, the target data is bound to the dimension according to the dimension type corresponding to the target data, including:
[0070] When the dimension type corresponding to the target data is the geographic dimension, a classification field corresponding to the target data is obtained, and the target data is bound to the dimension based on the classification field, and the classification field includes a field used for regional division;
[0071] When the dimension type corresponding to the target data is the ordinary dimension, the target data is bound to the dimension.
[0072] Specifically, the dimension type of the dimension includes the geographic dimension and the ordinary dimension, when the dimension type corresponding to the target data is the geographic dimension, for example, the dimension type of the city dimension is the geographic dimension, wherein the city dimension includes administrative division code, administrative division name, and upper administrative division code, and the city dimension can be provided with classification fields such as South China, North China, Central China, West China, and East China, so as to realize the binding of the target data to the dimension (city dimension) based on the classification field. When the dimension type corresponding to the target data is the ordinary dimension, for example, the dimension type of the company department dimension is the ordinary dimension, wherein the company department dimension includes department code, department name, and upper department code, and the target data is directly bound to the dimension (company department dimension).
[0073] Exemplarily, the classification field can further include a field for product category division, for example, an order transaction, a classification field corresponding to the order transaction can be obtained, such as a digital product, a home product, etc. for division, and the order data is bound to the corresponding dimension according to the classification field. The order transaction can be a geographic dimension. It can be understood that the target data which can be classified and needs to be classified belongs to the type of geographic dimension, and is not limited to classification of geographic location. It should be noted that the dimension type of the dimension further includes a time dimension, for example, a date dimension. The date dimension does not need to bind the target data, but obtains the data corresponding to the date dimension through initialization. It can be understood that the data corresponding to the date dimension can be a time table defined in advance in the computer device. The dimension whose dimension type is the time dimension cannot be deleted.
[0074] In the embodiment of the application, when the dimension type corresponding to the target data is a geographic dimension, the binding of the target data and the corresponding dimension is completed according to the classification field. When the dimension type corresponding to the target data is a normal dimension, the target data is directly bound to the dimension, which facilitates subsequent query of the target data under the corresponding dimension and improves the standardization of the index system management.
[0075] In one of the embodiments, the query statement is assembled according to the calculation field and the dimension field, including:
[0076] The target data corresponding to the atomic index is determined based on the calculation field, and the dimension corresponding to the atomic index is obtained according to the dimension field;
[0077] The atomic index, the target data corresponding to the atomic index and the dimension corresponding to the atomic index are connected through the calculation field and the dimension field to assemble the query statement.
[0078] Specifically, after the user confirms the data type corresponding to the current atomic index, because the number of target data belonging to the data type is large, and not all target data belonging to the data type need to be bound to the atomic index, the computer device determines the target data corresponding to the atomic index based on the calculation field set by the user. Similarly, the target data corresponding to the corresponding dimension can be obtained. The target data corresponding to the atomic index is obtained through the dimension field. The atomic index, the target data corresponding to the atomic index and the dimension corresponding to the atomic index are connected through the calculation field and the dimension field to complete the assembly of the query statement.
[0079] In the embodiment of the application, the target data corresponding to the atomic index is determined based on the calculation field, and the dimension corresponding to the atomic index is obtained according to the dimension field, so as to complete the assembly of the query statement, realize automatic acquisition of the atomic index, reduce the cost and improve the development efficiency.
[0080] In one embodiment, the method further comprises:
[0081] obtaining a decoration condition, the decoration condition being used to filter target data corresponding to the atomic index to determine specified data;
[0082] connecting the atomic index, the specified data and a dimension corresponding to the atomic index through the calculation field, the dimension field and the decoration condition to assemble the query statement.
[0083] The decoration condition can be set according to actual conditions, and is not limited in the embodiments of the present application.
[0084] Specifically, the user inputs the decoration condition, and the computer device filters the target data corresponding to the atomic index according to the decoration condition to obtain the specified data, for example, if only the transaction customer data of males needs to be counted, the decoration condition can be set as "customer gender = male" to obtain the corresponding specified data; the atomic index, the specified data corresponding to the atomic index are connected through the calculation field and the decoration condition, and the atomic index, the dimension corresponding to the atomic index are connected through the dimension field to complete the assembly of the query statement.
[0085] In the embodiments of the present application, the atomic index, the specified data and the dimension corresponding to the atomic index are connected through the calculation field, the dimension field and the decoration condition to complete the assembly of the query statement, the atomic index is automatically obtained, the development efficiency is improved while the cost is reduced, and the calculation index management becomes more efficient.
[0086] For the understanding of those skilled in the art, the steps of assembling the query statement according to the calculation field and the dimension field will be described below in combination with a specific example, as shown in the following table. Figure 4 The data type of the atomic index includes sql, data table and data view, wherein the data table and the data type are collectively referred to as a database object; when the selected bound data type is sql, it can be understood that the atomic index is bound to the result data set generated after the execution of the sql statement, and in order to ensure the accuracy of the sql statement, the sql statement needs to be executed first. If the sql statement is an unexecutable sql statement or there is no data after execution or the result set after execution does not meet the binding condition of the index, the binding is not permitted.
[0087] After the user confirms the data type corresponding to the current atomic indicator, the user sets the calculation field corresponding to the atomic indicator. Taking the data type sql as an example, the result set obtained after executing the sql statement is a two-dimensional table, and therefore a specific column needs to be selected for calculation. For example, the sql statement is to query a transaction information table, which includes the following fields: transaction customer name, transaction amount, transaction date, payment method, and transaction location. The atomic indicator is the number of transaction customers, and the transaction customer name needs to be bound as the calculation field. If the atomic indicator is the total transaction amount, the transaction amount needs to be selected as the calculation field.
[0088] The user continues to set the dimension field corresponding to the atomic indicator. Taking the data type sql as an example, the user sets the transaction location and the transaction method as the dimension field. The transaction location needs to be associated with the dimension of geographic dimension, so that the number of transaction customers in the south of China and the number of transaction customers in the central region of China can be counted according to the corresponding classification field in the geographic latitude. The payment method needs to be associated with the payment method (normal dimension), so that the number of customers using WeChat payment and the number of customers using Alipay can be counted.
[0089] The user sets the decoration condition, which is used to filter the target data (sql, database object) corresponding to the atomic indicator to determine the specified data. The computer device saves the association between the atomic indicator and the fact table (target data) to complete the binding of the fact table, and connects the atomic indicator, the specified data, and the dimension corresponding to the atomic indicator through the calculation field and the dimension field to assemble a query statement.
[0090] In one of the embodiments, the number of target dimensions is one or more. The target dimension is selected from the dimensions common to the calculation indicators associated with the indicator calculation model, including:
[0091] The business requirement information is obtained, and the target dimension is determined from the dimensions common to the calculation indicators associated with the indicator calculation model according to the business requirement information.
[0092] The business requirement information can be set according to actual conditions, which is not limited in the embodiments of the present application.
[0093] Specifically, since the combination of dimensions is not meaningful for all combinations, and arbitrary combination of dimensions will cause an explosion of dimension data and an explosion of indicator result data, which not only wastes computing resources but also causes a sharp increase in the storage space requirement of the indicator result data, the target dimension is determined from the dimensions common to the calculation indicators associated with the indicator calculation model according to the business requirement information, which can meet the business requirement without wasting computing resources and greatly saving storage space.
[0094] Exemplarily, when the target dimension is single (one dimension), it can represent that target data of a certain dimension needs to be calculated separately, for example, the number of customers in the South China region, the number of customers in the North China region, the number of customers of Alipay, or the number of customers of WeChat; when the target dimension is two (two dimensions), it can represent that target data of two dimensions needs to be calculated, for example, the number of WeChat payment customers in the South China region, the number of Alipay payment customers in the South China region, the number of WeChat payment customers in the North China region, and the number of Alipay payment customers in the North China region.
[0095] In the embodiments of the present application, the target dimension is determined from the dimensions common to the calculation indicators associated with the index calculation model based on the business requirement information, the business requirement is met, and the computing resources are not wasted, and the storage space is greatly saved.
[0096] In one of the embodiments, the calculation statement is assembled according to the target dimension, the index calculation model, and the calculation indicators associated with the index calculation model, comprising:
[0097] The target dimension and the index calculation model are connected through the calculation indicators associated with the index calculation model to assemble the calculation statement.
[0098] Specifically, the target dimension and the index calculation model are connected through the calculation indicators associated with the target dimension and the index calculation model, respectively, to assemble the calculation statement.
[0099] In the embodiments of the present application, the target dimension and the index calculation model are connected through the calculation indicators associated with the index calculation model to assemble the calculation statement, which realizes automatic acquisition of the calculation indicators, reduces the cost, and improves the development efficiency.
[0100] For the understanding of those skilled in the art, the steps of assembling the calculation statement according to the target dimension, the index calculation model, and the calculation indicators associated with the index calculation model will be described below with reference to a specific example, as shown in Figure 5 .
[0101] The user clicks the button of setting the calculation formula in the page to enter the calculation formula editing page, selects the atomic indicators that need to participate in the calculation, and encircles the calculation range of the calculation indicators; the user inputs the index calculation model and verifies its legality, sets the calculation dimension of the index when the index calculation model passes the legality verification, that is, selects the dimension common to the calculation indicators associated with the index calculation model as the target dimension, and publishes the index calculation model into a job, executes the calculation job according to the index calculation frequency, that is, assembles the calculation statement according to the target dimension, the index calculation model, and the calculation indicators associated with the index calculation model, and finally acquires the calculation indicators.
[0102] For the convenience of the understanding of those skilled in the art, the standardization management method of the enterprise-level index system is described below in combination with a specific example, as shown in Figure 6
[0103] By modeling the index management, the physical model attributes of the index management are: index name, index code, index type, calculation type, index unit, index data type, index data precision, calculation frequency, index dimension, business scope, responsible department, responsible person, operation permission of the index, and search permission of the index. The index includes an atomic index and a calculation index; the atomic index is an index calculated through a physical table, a view, or a result set of a sql statement in a data source. The calculation index is an index calculated through public calculation such as addition, subtraction, multiplication, and division between indexes or between an index and a constant.
[0104] Then, the index dimension and the index directory are secondarily modeled, and the dimension of the index, the index directory, the basic information of the index, and the permission information of the index are uniformly managed. After the information of the index is managed, the index model and the dimension model are associated with data (target data) in the enterprise data warehouse, the automatic generation of the index calculation code (query statement, calculation statement) is realized, the code is encapsulated into a job through a scheduling tool, and the job is automatically executed according to the calculation frequency of the index. After the execution is completed, the result data of the index can be viewed in the computer device through the index.
[0105] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise explicitly stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0106] Based on the same inventive concept, the embodiments of the present application also provide an enterprise-level index system standardization management device for implementing the above-mentioned standardization management method of the enterprise-level index system. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more enterprise-level index system standardization management device embodiments provided below can refer to the limitations of the enterprise-level index system standardization management method described above, and will not be described here.
[0107] In one exemplary embodiment, as shown in Figure 7 A standardized management device 700 of an enterprise-level index system is provided, and the device 700 includes:
[0108] A dimension adding module 701 is configured to add a dimension based on dimension basic information, and bind target data with a corresponding dimension according to a dimension type of the target data, wherein the dimension type includes a normal dimension and a geographic dimension.
[0109] An index adding module 702 is configured to add an index based on index basic information, wherein the index includes a calculation index and an atomic index.
[0110] A first statement module 703 is configured to obtain a calculation field and a dimension field corresponding to the atomic index respectively, and assemble a query statement according to the calculation field and the dimension field, wherein the query statement is configured to associate and bind the atomic index with target data corresponding to the calculation field, and the query statement is further configured to associate and bind the atomic index with a dimension corresponding to the dimension field.
[0111] A second statement module 704 is configured to define an index calculation model and perform a legality check on the index calculation model, wherein the index calculation model corresponds to the calculation index, and one index calculation model supports a plurality of atomic indexes and / or a plurality of calculation indexes freely combined.
[0112] The second statement module 704 is further configured to, when the index calculation model passes the legality check, select a dimension common to the calculation indexes associated with the index calculation model as a target dimension, assemble a calculation statement according to the target dimension, the index calculation model, and the calculation indexes associated with the index calculation model, and load the calculation statement to run according to a preset time interval to obtain a calculation index corresponding to the index calculation model, wherein the target dimension represents a dimension corresponding to the index calculation model.
[0113] In one embodiment, the dimension adding module 701 is further configured to, when the dimension type corresponding to the target data is the geographic dimension, obtain a classification field corresponding to the target data, and bind the target data with the dimension based on the classification field, wherein the classification field includes a field used for regional division.
[0114] When the dimension type corresponding to the target data is the normal dimension, the target data is bound with the dimension.
[0115] In one embodiment, the first statement module 703 is further configured to determine target data corresponding to the atomic index based on the calculation field, and obtain a dimension corresponding to the atomic index according to the dimension field.
[0116] The atomic indicator, the specified data and the dimension corresponding to the atomic indicator are connected by calculating the field and the dimension field to assemble the query statement.
[0117] In one of the embodiments, the first statement module 703 is further configured to acquire a decoration condition, the decoration condition being used to filter the target data corresponding to the atomic indicator to determine the specified data.
[0118] The atomic indicator, the specified data and the dimension corresponding to the atomic indicator are connected by calculating the field and the dimension field to assemble the query statement.
[0119] In one of the embodiments, the number of target dimensions is one or more; the second statement module 704 is further configured to acquire business requirement information, and determine the target dimensions from the dimensions shared by the calculation indicators associated with the indicator calculation model according to the business requirement information.
[0120] In one of the embodiments, the second statement module 704 is further configured to connect the target dimensions and the indicator calculation model by the calculation indicators associated with the indicator calculation model to assemble the calculation statement.
[0121] The modules in the above enterprise-level indicator system standardized management device can be realized by software, hardware and combinations thereof in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.
[0122] In one of the embodiments, a computer device is provided, which can be a terminal, and the internal structure diagram thereof can be as shown in Figure 8As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the external terminal in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. The computer program is executed by the processor to realize an enterprise-level index system standardization management method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0123] Those skilled in the art can understand that, Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0124] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to realize the enterprise-level index system standardization management method described above.
[0125] In one embodiment, a computer readable storage medium is provided, having a computer program stored thereon, and the computer program is executed by the processor to realize the enterprise-level index system standardization management method described above.
[0126] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to realize the enterprise-level index system standardization management method described above.
[0127] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0128] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0129] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.
[0130] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A standardized management method for an enterprise-level indicator system, characterized in that, The method includes: Based on the basic information of the dimensions, the operation of adding dimensions is completed. According to the dimension type corresponding to the target data, the target data is bound to the corresponding dimension. The dimension type includes ordinary dimensions and geographic dimensions. Based on the basic information of the indicators, the operation of adding new indicators is completed. The indicators include calculated indicators and atomic indicators. Obtain the calculated field and dimension field corresponding to the atomic indicator respectively, and assemble a query statement based on the calculated field and the dimension field. The query statement is used to associate and bind the atomic indicator and the target data corresponding to the calculated field based on the calculated field. The query statement is also used to associate and bind the atomic indicator and the dimension corresponding to the dimension field. Define an indicator calculation model and perform a validity check on the indicator calculation model. The indicator calculation model corresponds to the calculation indicator. One indicator calculation model supports multiple atomic indicators and / or multiple calculation indicators in a free combination. When the indicator calculation model passes the validity check, the dimension common to all the calculated indicators associated with the indicator calculation model is selected as the target dimension. Calculation statements are assembled based on the target dimension, the indicator calculation model, and the calculated indicators associated with the indicator calculation model. The calculation statements are used to load and run the indicator calculation model at preset time intervals to obtain the calculated indicator corresponding to the indicator calculation model. The target dimension is used to characterize the dimension corresponding to the indicator calculation model.
2. The method according to claim 1, characterized in that, The step of binding the target data with the dimension according to the dimension type corresponding to the target data includes: When the dimension type corresponding to the target data is the geographic dimension, obtain the classification field corresponding to the target data, and bind the target data to the dimension based on the classification field. The classification field includes a field for regional division. When the dimension type corresponding to the target data is the ordinary dimension, the target data is bound to the dimension.
3. The method according to claim 1, characterized in that, Assembling the query statement based on the calculated field and the dimension field includes: The target data corresponding to the atomic index is determined based on the calculated field, and the dimension corresponding to the atomic index is obtained based on the dimension field; The query statement is assembled by connecting the atomic indicator, the target data corresponding to the atomic indicator, and the dimension corresponding to the atomic indicator through the calculated field and the dimension field.
4. The method according to claim 3, characterized in that, The method further includes: Obtain decoration conditions, which are used to filter the target data corresponding to the atomic index and determine the specified data; The query statement is assembled by connecting the atomic indicator, the specified data, and the dimension corresponding to the atomic indicator through the calculated field, the dimension field, and the decorator condition.
5. The method according to claim 1, characterized in that, The number of target dimensions is one or more; selecting the common dimension among the calculation indicators associated with the indicator calculation model as the target dimension includes: Obtain business requirement information, and determine the target dimension from the dimensions common to all the calculation indicators associated with the indicator calculation model based on the business requirement information.
6. The method according to claim 1, characterized in that, The assembly of calculation statements based on the target dimension, the indicator calculation model, and the calculation indicators associated with the indicator calculation model includes: The target dimension and the indicator calculation model are connected by the calculation indicator associated with the indicator calculation model to assemble the calculation statement.
7. A standardized management device for an enterprise-level indicator system, characterized in that, The device includes: a dimension addition module, used to add dimensions based on basic dimension information, and bind the target data to the corresponding dimension according to the dimension type of the target data; wherein, the dimension type includes ordinary dimension and geographic dimension; The indicator addition module is used to add indicators based on their basic information. The indicators include calculated indicators and atomic indicators. The first statement module is used to obtain the calculated field and dimension field corresponding to the atomic indicator respectively, and to assemble a query statement based on the calculated field and the dimension field. The query statement is used to associate and bind the atomic indicator and the target data corresponding to the calculated field according to the calculated field. The query statement is also used to associate and bind the atomic indicator and the dimension corresponding to the dimension field. The second statement module is used to define the indicator calculation model and perform a validity check on the indicator calculation model. The indicator calculation model corresponds to the calculation indicator, and one indicator calculation model supports multiple atomic indicators and / or multiple calculation indicators in a free combination. The second statement module is further configured to, when the indicator calculation model passes the validity check, select the common dimension of each of the calculated indicators associated with the indicator calculation model as the target dimension, and assemble a calculation statement based on the target dimension, the indicator calculation model, and the calculated indicators associated with the indicator calculation model. The calculation statement is used to load the indicator calculation model for execution at a preset time interval to obtain the calculated indicator corresponding to the indicator calculation model. The target dimension is used to characterize the dimension corresponding to the indicator calculation model.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Medical insurance business index data storage and query method and system
CN119003527A
OLAP pre-calculation model, automatic modeling method, and automatic modeling system
US20180285439A1