Index analysis method and device, equipment and medium
By layering the calculation of basic and composite indicators in the SAP system, and using dynamic SQL queries, the timeliness and accuracy of indicator analysis in a large-scale data environment is solved, real-time and accurate indicator display and decision support are achieved.
Patent Information
- Application Number
- CN202510335478.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-18
AI Technical Summary
In the large-scale data environment in the prior art, the timeliness and accuracy of indicator analysis are difficult to meet the requirements of the enterprise, resulting in delays in decision-making responses and failure of risk control.
By obtaining user-generated configuration sets in the SAP system, hierarchically calculate basic indicators and composite indicators, and using the SAP HANA platform and indicator configuration platform for dynamic SQL queries to realize real-time indicator calculation and display.
It improves the accuracy and consistency of indicator analysis, ensures the reliability and stability of data processing, and improves the timeliness of decision-making in enterprise management.
Smart Images

Figure CN120338327A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a method for analyzing indicators, an apparatus for analyzing indicators, an electronic device, and a machine-readable storage medium. Background Art
[0002] With the continuous deepening of the application of indicator analysis in enterprises, enterprises have put forward higher requirements for the timeliness and accuracy of indicator analysis. Especially for financial monetary fund accounts, the data related to indicators changes in real time. Enterprises must monitor the dynamic changes of these data in real time so as to provide timely and accurate decision-making support for the leadership, enabling them to quickly make corresponding policy adjustments.
[0003] In the related art, the indicator analysis system is based on a T+1 data update mechanism, which has problems such as lag in obtaining business data and lack of real-time monitoring capabilities, resulting in delayed decision-making responses and ineffective risk control. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a method for analyzing indicators, an apparatus for analyzing indicators, a device, and a medium, so as to solve the problem that in the existing technology, in a large-scale data environment, it is difficult for the timeliness and accuracy of indicator analysis to meet the requirements of enterprises.
[0005] To achieve the above purpose, the first aspect of this application provides a method for analyzing indicators, which is applied to an SAP system. The SAP system is connected to an indicator configuration platform, and the indicator configuration platform is connected to a visualization platform. The method includes:
[0006] Obtain a configuration set generated by the indicator configuration platform in response to an indicator analysis request initiated by a user; wherein, the configuration set includes a target indicator selected by the user and configuration information of the target indicator. The target indicators are divided into basic indicators and composite indicators, and the composite indicators are associated with at least one basic indicator;
[0007] For each basic indicator, determine the indicator calculation result of the basic indicator according to the configuration information of the basic indicator;
[0008] For each composite indicator, determine the indicator calculation result of the composite indicator according to the configuration information of the composite indicator and the indicator calculation results of the basic indicators associated with it;
[0009] Send the respective indicator calculation results to the indicator configuration platform, so that the indicator configuration platform sends the respective indicator calculation results to the visualization platform for display.
[0010] In the embodiments of this application, the configuration information of the basic indicator includes indicator calculation parameter information and indicator calculation logic, and the indicator calculation parameter information includes indicator calculation parameters and their parameter values;
[0011] For each basic metric, according to the configuration information of the basic metric, determine the metric calculation result of the basic metric, including:
[0012] For each basic metric, generate a target SQL query statement corresponding to the basic metric according to the configuration information of the basic metric;
[0013] For each basic metric, execute the target SQL query statement corresponding to the basic metric to obtain the SQL query result corresponding to the basic metric, and determine the metric calculation result of the basic metric according to the metric calculation logic of the basic metric and the corresponding SQL query result.
[0014] In the embodiments of the present application, for each basic metric, generating a target SQL query statement corresponding to the basic metric according to the configuration information of the basic metric includes:
[0015] For each basic metric, if it is determined that the metric calculation parameters of the basic metric include a same-cycle value identifier, generate a first SQL query statement and a second SQL query statement corresponding to the basic metric according to the configuration information of the basic metric; wherein, the parameter value of the same-cycle value identifier is the same period and / or cycle period, and the target SQL query statement corresponding to the basic metric includes the first SQL query statement and the second SQL query statement corresponding to the basic metric;
[0016] For each basic metric, if it is determined that the metric calculation parameters of the basic metric do not include a same-cycle value identifier, generate a target SQL query statement corresponding to the basic metric according to the configuration information of the basic metric.
[0017] A second aspect of the present application provides a metric analysis method, which is applied to a metric configuration platform. The metric configuration platform is connected to an SAP system and a visualization platform. The method includes:
[0018] When it is monitored that a user initiates a metric analysis request, generate a configuration set; wherein, the configuration set includes a target metric selected by the user and the configuration information of the target metric. The target metric is divided into a basic metric and a composite metric, and the composite metric is associated with at least one basic metric;
[0019] Send the configuration set to the SAP system, so that the SAP system determines the metric calculation result of the basic metric according to the configuration information of the basic metric, determines the metric calculation result of the composite metric according to the configuration information of the composite metric and the metric calculation results of the basic metrics associated therewith, and sends the metric calculation results fed back by the SAP system to the visualization platform for display.
[0020] In an embodiment of the present application, before generating a configuration set when it is monitored that a user initiates an index analysis request, the method further includes:
[0021] Determine the current working mode of the index configuration platform; wherein, the current working mode is a formal mode or a simulation mode;
[0022] If the current working mode is the formal mode, display pre-set formal indexes in the operable interface of the index configuration platform; wherein, the index calculation logic of the formal indexes is pre-set;
[0023] If the current working mode is the simulation mode, display pre-set informal indexes in the operable interface of the index configuration platform; wherein, the index calculation logic of the informal indexes is configured by the user.
[0024] In an embodiment of the present application, when it is monitored that a user initiates an index analysis request and generates a configuration set, it includes:
[0025] When it is monitored that a user initiates an index analysis request, if the current working mode is the formal mode, determine the formal indexes selected by the user in the operable interface of the index configuration platform as target indexes; if the current working mode is the simulation mode, determine the informal indexes selected by the user in the operable interface of the index configuration platform as target indexes;
[0026] Generate the configuration set based on the configuration information of each target index in the operable interface of the index configuration platform.
[0027] A third aspect of the present application provides an index analysis device, and the device includes:
[0028] Configured in the SAP system, the SAP system is connected to an index configuration platform, and the index configuration platform is connected to a visualization platform. The device includes:
[0029] A configuration acquisition module, configured to acquire the configuration set generated by the index configuration platform in response to an index analysis request initiated by a user; wherein, the configuration set includes the target indexes selected by the user and the configuration information of the target indexes, the target indexes are divided into basic indexes and composite indexes, and the composite indexes are associated with at least one basic index;
[0030] A first index analysis module, configured to, for each basic index, determine the index calculation result of the basic index according to the configuration information of the basic index;
[0031] A second index analysis module, configured to, for each composite index, determine the index calculation result of the composite index according to the configuration information of the composite index and the index calculation results of the basic indexes associated therewith;
[0032] An analysis result display module, configured to send the calculation results of each indicator to the indicator configuration platform, so that the indicator configuration platform sends the calculation results of each indicator to the visualization platform for display.
[0033] A fourth aspect of the present application provides an indicator analysis device, configured in an indicator configuration platform. The indicator configuration platform is connected to an SAP system and a visualization platform. The device includes:
[0034] A configuration generation module, configured to generate a configuration set when it is monitored that a user initiates an indicator analysis request; wherein, the configuration set includes the target indicators selected by the user and the configuration information of the target indicators. The target indicators are divided into basic indicators and composite indicators, and the composite indicators are associated with at least one basic indicator;
[0035] A configuration sending module, configured to send the configuration set to the SAP system, so that the SAP system determines the calculation results of the basic indicators according to the configuration information of the basic indicators, determines the calculation results of the composite indicators according to the configuration information of the composite indicators and the calculation results of the associated basic indicators, and sends the calculation results of each indicator fed back by the SAP system to the visualization platform for display.
[0036] A fifth aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the indicator analysis method described in the first aspect or the second aspect is implemented.
[0037] A sixth aspect of the present application provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the indicator analysis method described in the first aspect or the second aspect.
[0038] The indicator analysis method, device, equipment, and medium provided by the present application, after obtaining the configuration set generated based on user operations, ensure the accuracy, consistency, and real-time nature of the calculation results of each indicator by performing indicator hierarchical calculations in a pre-set logical order in real time (that is, first calculating the basic indicators, and then calculating the composite indicators after calculating all the basic indicators). This method can process multiple independent basic indicators simultaneously and serially process nested composite indicators with dependencies to ensure that the indicator calculation results meet user requirements, improving the stability of the method and the reliability of data processing. It can be seen that the present application can effectively improve the decision-making timeliness of enterprise management.
[0039] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. Brief Description of the Drawings
[0040] The drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application, but do not constitute a limitation to the embodiments of the present application. In the drawings:
[0041] Figure 1 Schematically shows a first flowchart of the index analysis method according to an embodiment of the present application;
[0042] Figure 2 Schematically shows a schematic diagram of the composite index calculation process in an embodiment of the present application;
[0043] Figure 3 Schematically shows an application schematic diagram of the index analysis method in an embodiment of the present application;
[0044] Figure 4 Schematically shows a flowchart of an index analysis example in an embodiment of the present application;
[0045] Figure 5 Schematically shows a second flowchart of the index analysis method according to an embodiment of the present application;
[0046] Figure 6 Schematically shows a schematic diagram of the index configuration table in an embodiment of the present application;
[0047] Figure 7 Schematically shows a schematic diagram of the formal basic index key value table in an embodiment of the present application;
[0048] Figure 8 Schematically shows a first structural block diagram of the index analysis device according to an embodiment of the present application;
[0049] Figure 9 Schematically shows a second structural block diagram of the index analysis device according to an embodiment of the present application;
[0050] Figure 10 Schematically shows an internal structure diagram of a computer device according to an embodiment of the present application.
[0051] Description of the Reference Numerals
[0052] A01 - Processor; A02 - Network Interface; A03 - Internal Memory; A04 - Display Screen; A05 - Input Device; A06 - Non - Volatile Storage Medium; B01 - Operating System; B02 - Computer Program. Detailed Description of the Embodiments
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. It should be understood that the specific implementation manners described herein are only for the purpose of illustration and explanation of the embodiments of this application, and are not used to limit the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without making creative efforts fall within the scope of protection of this application.
[0054] It should be noted that if there are directional indications (such as up, down, left, right, front, back, etc.) involved in the embodiments of this application, such directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0055] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of this application, such descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0056] In view of the problem that in the related art, the timeliness and accuracy of index analysis are difficult to meet the requirements of enterprises in a large-scale data environment, this application provides a method, device, equipment, and medium for index analysis. The method, device, equipment, and medium for index analysis provided by this application will be described in detail below with reference to the accompanying drawings through specific embodiments and implementation manners.
[0057] Figure 1 Schematically shows a flowchart of the index analysis method according to the embodiments of this application. As Figure 1 shown, in an embodiment of this application, a method for index analysis is provided, which is applied to an SAP system. The SAP system is connected to an index configuration platform, and the index configuration platform is connected to a visualization platform.
[0058] Among them, the SAP system includes the SAP HANA platform, the SAP HANA database, and SAP SLT. Specifically, the SAP HANA platform is a comprehensive in-memory computing platform that not only includes the SAP HANA database but also provides advanced analysis capabilities and application development capabilities. The SAP HANA database is the core component of the SAP HANA platform, supports applications such as SAP BW / 4HANA, and provides high-performance data storage and computing capabilities. SAP SLT is an independent data replication tool that supports real-time or scheduled data replication from the source system to the SAP HANA database or other target systems.
[0059] Among them, the metric configuration platform can be developed using the Java language. The metric configuration platform provides an operable interface. After a user performs a series of operations on this operable interface, a custom configuration set can be generated.
[0060] In the embodiment of this application, the SAP system and the metric configuration platform achieve two-way data interaction. At the same time, a dynamic information interaction mechanism is also established between the metric configuration platform and the visualization platform.
[0061] In the embodiment of this application, the method may include the following steps.
[0062] Step A100, obtain the configuration set generated by the metric configuration platform in response to a metric analysis request initiated by the user.
[0063] Among them, the configuration set includes the target metrics selected by the user and the configuration information of the target metrics. The target metrics are divided into basic metrics and composite metrics. The configuration information of the basic metrics includes metric calculation parameter information and metric calculation logic. The configuration information of the composite metrics includes metric calculation logic. The metric calculation parameter information includes metric calculation parameters and their parameter values. The metric calculation logic includes key values and operators.
[0064] In the embodiment of this application, a basic metric refers to an application layer ADSO model that can be created and stored with data after being synchronized to BW4 / HANA through SLT based on the source data table (such as the ACDOCA table) of the SAP ERP S4 system, and then combined with the preset data extraction rules of the metric configuration platform. It is usually filtered and calculated through specific financial accounts, organizational structures, etc. A composite metric refers to a more complex metric generated based on basic metrics through arithmetic operation logics such as addition, subtraction, multiplication, and division. That is, a composite metric is associated with at least one basic metric, and the metric calculation result of the composite metric is determined based on the metric calculation result of the basic metric.
[0065] It should be understood that in the embodiment of the present application, the key values in the configuration information of the basic indicators are the fields in the source data table (such as the balance at the beginning of the year and the increase in the current year), and their values can be extracted from the source data table for further calculation and analysis; the operator defines how to operate on the key values; the key values in the configuration information of the composite indicator are the indicator calculation results of the basic indicator.
[0066] In the embodiment of the present application, the user can select the target indicator to be calculated on the operable interface of the indicator configuration platform, and can flexibly configure the configuration information of the target indicator on the operable interface. When the user initiates an indicator analysis request on the indicator configuration platform (which can be achieved by clicking a button in the operable interface that represents the initiation of an indicator analysis request, etc.), a configuration set is generated, and the indicator analysis request includes the configuration set.
[0067] It is worth mentioning that in the embodiment of the present application, when the indicator configuration platform generates the configuration set, the configuration set will be synchronized to the BW4 / HANA system in real time, so that the HANA database in the BW4 / HANA system can directly use the user-defined configuration content (ie, the configuration set), thereby realizing efficient data synchronization and calculation across platforms.
[0068] In a specific example, the computable indicators are displayed in the form of their indicator codes (I_KPI) in the operable interface of the indicator configuration platform, and the user can select a single indicator or multiple indicators as target indicators in the operable interface.
[0069] It is worth mentioning that users can also specify specific key values of target indicators in the operational interface to meet flexible data acquisition needs. Specifically, assuming that there are 4 key values when configuring the indicator, but only one of the key values is actually used, the specific key value required can be specified in the operational interface, which is the specific key value of the target indicator. For example, the indicator with indicator code FIGX00000005 has 4 key values, namely _BIC_YQCYE (beginning balance), _BIC_YBQZJ (increase this year), _BIC_YBQJS (reduction this year) and _BIC_YQMYE (end balance). A certain demand only requires the key value of _BIC_YQMYE (end balance). At this time, FIGX00000005._BIC_YQMYE can be requested separately in I_KPI, and the interface only returns the data of the key value of _BIC_YQMYE (end balance), and does not return the data of other key values.
[0070] In this specific example, the indicator calculation parameters of the indicator include parameters such as organizational structure code, organizational structure type, node type, date, and number of limit items. These parameters are specifically introduced and explained below.
[0071] Organization Structure Code (I_YZZJG): Supports single - value or multi - value input. Users can specify a single organization structure (e.g., 001300), or combine multiple organization structures (e.g., 001300 and SC1300) for data calculation. By configuring this parameter, it can adapt to different levels and structures of organization structures, meet the multi - index calculation requirements from single - entity companies to parent companies, and ensure that this method can efficiently and accurately obtain the required data in a complex organization structure environment, that is, support the index calculation requirements of multi - level organization structures.
[0072] Organization Structure Type (I_ORG_TYPE): Supports single - value input and is used to distinguish different types of organization structures, mainly including management structure (GLJG) and property right structure (CQJG). Specifically, since an enterprise may have multiple sets of organization structures at the same time, by configuring this parameter, it ensures that users can select the corresponding structure for index calculation and data analysis according to specific needs. That is to say, by configuring this parameter, this method can adapt to the multi - dimensional organizational structure in different business scenarios, ensure the accuracy and pertinence of calculation results, and meet the data acquisition requirements under complex enterprise structures.
[0073] Node Type (I_CURRENT_NODE): Supports single - value input and is used to determine the type of organization structure node returned, providing a flexible data acquisition method. The values of the node type mainly include: CURRENT_NODE (indicating the return of the current node, that is, the organization structure specified in the parameter I_YZZJG), NEXT_NODE (indicating the return of the next - level node of the organization structure specified by I_YZZJG), ALL_DT_NODE (indicating the return of the organization structure of all single - entity nodes associated with I_YZZJG). By configuring this parameter, this method can flexibly select the level and scope of the organization structure for index calculation according to different business needs, thus meeting the accurate data acquisition requirements of enterprises under multi - level structures. That is to say, this parameter provides users with the ability of fine - grained control and efficient data query in a complex organization structure, ensuring that this method can adapt to different business scenarios.
[0074] Date (I_DATE): Supports single - value input and only allows users to input a specific date. This parameter is used to determine the specific period for index calculation (which can be the current period, the start and end periods of the year - to - date cumulative period, the periods where the beginning time point is located, the periods where the end time point is located, the start and end periods of the year - to - date increase, the start and end periods of the year - to - date decrease), ensuring that this method accurately returns relevant business index data according to the specified date. Ensure the accuracy and efficiency of data acquisition, support real - time calculation, meet the accurate analysis needs of enterprises at a single time point, and improve the reliability and flexibility of data processing.
[0075] Limit number (I_UP): It has two main functions. First, this parameter is used to meet specific business requirements, such as extracting the top 10 data, etc.; second, I_UP is used to prevent the risk of extracting too large a data volume due to parameter errors, thereby protecting the system performance. By default, the SAP system sets the value of I_UP to 20,000 records. Of course, it can be understood that the user can adjust the value of this parameter according to specific needs to flexibly control the returned data volume. By configuring this parameter, not only the security and stability of this method are improved, but also flexible data extraction capabilities are provided, ensuring that the data extraction requirements can be efficiently and accurately met in various business scenarios.
[0076] In another specific example, in addition to parameters such as organizational structure code, organizational structure type, node type, date, and limit number, the index calculation parameters of the index also include parameters such as filter conditions, grouping conditions, sorting conditions, and same cycle period value identification. The following is a specific introduction to these parameters.
[0077] Filter condition (I_FILTER): Allows users to customize additional data extraction conditions according to specific needs to further refine the data screening range. By configuring this parameter, users can flexibly add multiple filter conditions (such as field values, ranges, logical operations), thereby precisely controlling the data extraction process. By configuring this parameter, a high degree of flexibility is provided, which is suitable for various complex business scenarios, ensuring that users can adjust the query range according to specific analysis needs, and improving the accuracy and usage efficiency of data acquisition in this method.
[0078] Grouping condition (I_GROUP): It has two main functions. First, this parameter is used to determine the dimension of the returned data, and the user can customize the specific grouping dimension. Second, I_GROUP allows data aggregation operations according to user needs. If the user does not fill in this parameter, this method will default to returning data according to the preset dimension of the index. By configuring this parameter, users can flexibly set the level and aggregation method of data return, adapt to diverse analysis scenarios, ensure that this method has flexibility and accuracy in data processing, and meet the data extraction and aggregation requirements of enterprises in different dimensions.
[0079] Sorting condition (I_ORDER): Users can customize the data sorting rules according to their needs. By configuring this parameter, users can flexibly specify the sorting order (ascending or descending) of a single or multiple fields, thereby arranging the results in an orderly manner. If the user does not define this parameter, this method will return data according to the preset sorting rules. By configuring this parameter, it is ensured that this method can adapt to different business scenarios and analysis needs, improving the efficiency of data retrieval and the user's customization ability, and meeting the diverse requirements of enterprises for flexible data extraction and result sorting.
[0080] Same period value identifier (I_THQ_FLAG): Users can flexibly set the time comparison dimension according to their needs. If the user does not define this parameter, this method will default to returning only the current period data; when the parameter value of this parameter is set to MOM, this method will return the current period and the period-on-period data; when the parameter value of this parameter is set to YOY, this method will return the current period and the same period data. Among them, the current period refers to the current time period, usually the current month, quarter or year, the same period refers to the same time period of the previous year corresponding to the current time period, and the period-on-period refers to the previous time period of the current time period. Of course, it can be understood that the user can also pass MOM and YOY at the same time. At this time, this method will return the current period, the period-on-period and the same period data. By configuring this parameter, the flexible time dimension data fetching requirements are met, allowing users to perform multi-period comparison analysis in various business scenarios, improving the comprehensiveness and flexibility of data analysis.
[0081] Step A200, for each basic indicator, determine the indicator calculation result of the basic indicator according to the configuration information of the basic indicator.
[0082] In an embodiment of the present application, a possible specific implementation manner of the step A200 is as follows.
[0083] Step A210, for each basic indicator, generate a target SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator.
[0084] In this specific implementation manner, an indicator configuration library and a logical table are configured in the SAP HANA database of the SAP system. The indicator calculation parameter information is stored in the indicator configuration library, and the indicator calculation logic is stored in the logical table. The SAP system generates a target SQL query statement corresponding to the basic indicator by parsing the configuration information of the basic indicator. Among them, the generation of the target SQL query statement can be implemented by methods such as CDS views (Core Data Services Views), SAP Query tools, and ABAP dynamic SQL. In specific applications, the implementation manner of the target SQL query statement can be selected according to the specific application scenario and development environment in step A210.
[0085] In a specific example, step A210 adopts the dynamic SQL technology of HANA. Through the I_KPI parameter (i.e., the metric code of the target metric) input by the user, it dynamically obtains the corresponding metric calculation logic from the logical table and generates the corresponding target SQL query statement to achieve a highly flexible metric calculation process. It can be seen that this method generates the corresponding target SQL query statement in real time according to the specific needs of the user, without pre-defining fixed SQL logic, ensuring the flexibility and scalability of this method, enabling the user to quickly adjust the metric calculation logic according to different business scenarios.
[0086] In the embodiment of the present application, a possible specific implementation manner of step A210 is as follows.
[0087] Step A211, for each basic metric, if it is determined that the metric calculation parameters of the basic metric include the same-cycle value identifier, then according to the configuration information of the basic metric, generate the first SQL query statement and the second SQL query statement corresponding to the basic metric.
[0088] Among them, the parameter value of the same-cycle value identifier is the same period and / or the cycle period. It should be understood that when the parameter value of the same-cycle value identifier is empty, it is considered that the metric calculation parameters of the basic metric do not include the same-cycle value identifier parameter.
[0089] When the metric calculation parameters of the basic metric include the same-cycle value identifier, the target SQL query statement corresponding to the basic metric includes the first SQL query statement and the second SQL query statement corresponding to the basic metric. Among them, the first SQL query statement is the SQL query statement corresponding to the current basic metric, and the second SQL query statement is the SQL query statement corresponding to the same period and / or the cycle period basic metric.
[0090] Step A212, for each basic metric, if it is determined that the metric calculation parameters of the basic metric do not include the same-cycle value identifier, then according to the configuration information of the basic metric, generate the target SQL query statement corresponding to the basic metric.
[0091] When the metric calculation parameters of the basic metric do not include the same-cycle value identifier, the target SQL query statement corresponding to the basic metric is the SQL query statement corresponding to the current basic metric.
[0092] Specifically, step A210 first determines whether the user has passed in the same-cycle value identifier parameter. When it is determined that the same-cycle value identifier parameter has been passed in, in addition to generating the SQL query statement corresponding to the current basic metric, generate the SQL query statement corresponding to the non-current (i.e., the same period and / or the cycle period) basic metric according to the parameter value of the same-cycle value identifier to obtain the current data and non-current data (i.e., the same period data and / or the cycle period data).
[0093] For the obtained current data and non-current data, they can be integrated into one row according to their dimension information, so that the same dimension record contains current data and non-current data. If the basic indicator contains multiple key values, the multiple key values can also be integrated into the same row, thereby improving the data processing efficiency and simplifying subsequent data analysis and use. That is to say, the embodiments of the present application can achieve year-on-year and month-on-month analysis of indicators. By obtaining current data and non-current data, it helps users conduct historical comparison analysis, thus supporting more in-depth data interpretation.
[0094] The following explains and illustrates the step A210 through a specific application example.
[0095] The user configures the parameter I_THQ_FLAG for a certain basic indicator in the FineReport visualization analysis platform, and its parameter values are MOM and YOY. Among them, MOM represents month-on-month (HB), and YOY represents year-on-year (TB). When the SAP HANA platform receives the configuration information, it first checks whether it contains the parameter I_THQ_FLAG. When it is determined that it contains this parameter and its parameter values are MOM and YOY, the HV A layer structure performs the following processing: adding the key value columns corresponding to MOM and YOY respectively. For example, when a certain basic indicator corresponds to 7 key values, 7 same-period values (i.e., the key values of the same-period basic indicator) and 7 cycle-period values (i.e., the key values of the cycle-period basic indicator) are added. The specific implementation method is: create a stored procedure regarding the basic indicator configuration information through the SAP HANA platform, determine whether the parameter value of the parameter I_THQ_FLAG is MOM, YOY, or both. After determining that the parameter value of the parameter I_THQ_FLAG is MOM and YOY, determine the same-period value and cycle-period value of the basic indicator based on the corresponding SQL query statement, and write them into the corresponding key value columns.
[0096] In this example, in the case of configuring the parameter I_THQ_FLAG, the SAP HANA platform does not directly give the ratios of the current period to the same period and the current period to the cycle period, but gives the current value, the same-period value, and the cycle-period value, so that the FineReport visualization analysis platform can perform data display or other processing based on these data to achieve year-on-year and month-on-month analysis.
[0097] It can be understood that in the case of configuring the parameter values of the same-period and cycle-period value identifiers, this method can accurately obtain the same-period data and cycle-period data according to the user's request, and both the same-period data and cycle-period data support multi-key value processing, helping users conduct year-on-year and month-on-month analysis in multiple dimensions and achieving more in-depth dynamic data analysis. It can be seen that through the optimization of dynamic SQL, this method can still efficiently process multiple key values when dealing with large-scale data, maintaining the computing performance while ensuring the accuracy and consistency of data processing.
[0098] Step A220: For each basic indicator, execute the target SQL query statement corresponding to the basic indicator to obtain the SQL query result corresponding to the basic indicator. Determine the calculation result of the basic indicator according to the indicator calculation logic of the basic indicator and the corresponding SQL query result.
[0099] Among them, the SQL query result corresponding to the basic indicator includes the values corresponding to the key values in its indicator calculation logic. Based on this, it can be understood that when the indicator calculation logic of the basic indicator and its corresponding SQL query result are determined, the calculation result of the basic indicator can be directly calculated.
[0100] In this specific embodiment, the SAP system supports the synchronous processing of multiple key values, that is, multiple data can be dynamically filtered from the source data table (such as the ACDOCA table) according to the configuration information of the basic indicator. In a specific example, step A220 filters data at different organizational levels based on the organizational structure type (such as management structure or property rights structure) to meet the specific needs of users.
[0101] In addition, in this specific embodiment, key values such as current period occurrence, year-to-date, beginning balance, ending balance, year-to-date increase, and year-to-date decrease accurately delimit the data range through different period ranges. The period range is dynamically determined according to IDATE through a time processing table. For example, if the requirement switches from monthly to quarterly, the time processing table will dynamically adjust the period range corresponding to the key values to ensure the accuracy of the calculation results of the key values in different periods.
[0102] Step A300: For each composite indicator, determine the calculation result of the composite indicator according to the configuration information of the composite indicator and the calculation results of its associated basic indicators.
[0103] Specifically, the embodiments of the present application dynamically calculate composite indicators according to logical relationships. Composite indicators can be divided into two categories, namely aggregable types (such as addition and subtraction operations) and non-aggregable types (such as multiplication and division operations). The SAP system supports the processing of these two types of composite indicators and dynamically adjusts the calculation method according to the indicator operation logic defined by the user. It can be understood that since the calculation result of the composite indicator is obtained based on the calculation result of the basic indicator, it can be considered that the composite indicator also has corresponding indicator calculation parameter information, and its corresponding indicator calculation parameter information is the same as that of the basic indicator associated with it.
[0104] It should be understood that in the embodiments of the present application, the SAP system has the ability to process multiple key values, that is, it can automatically integrate different key values of each basic indicator in the same calculation process, ensure that multiple key values participate in the composite operation and output results simultaneously, thereby improving the flexibility and efficiency in processing complex indicators and ensuring the accuracy and consistency of the indicator calculation results. In a specific application example, the schematic diagram of the composite indicator calculation process is as follows Figure 2 shown.
[0105] Step A400: Send the calculation results of each indicator to the indicator configuration platform, so that the indicator configuration platform sends the calculation results of each indicator to the visualization platform for display.
[0106] In the embodiments of the present application, the SAP system integrates and sends the calculation results of each target indicator to the visualization platform only after completing the calculation results of all target indicators according to the configuration information of each basic indicator, so as to ensure the accuracy and consistency of the data displayed in the visualization platform. Specifically, the SAP system synchronously transmits the calculation results of each indicator to the indicator configuration platform through a data interface, and the indicator configuration platform pushes it to the visualization platform.
[0107] Optionally, in the embodiments of the present application, before executing step A200, the method further includes the following steps.
[0108] Determine whether there is a parameter error in the configuration set. If it is determined that there is a parameter error, generate a corresponding parameter error prompt message and send it to the indicator configuration platform, so that the indicator configuration platform displays the parameter error prompt message; and / or
[0109] Determine whether there is data abnormality in the data obtained based on the configuration information of the basic indicator. If it is determined that there is data abnormality, generate a corresponding data error prompt message and send it to the indicator configuration platform, so that the indicator configuration platform displays the data error prompt message.
[0110] Among them, the data obtained based on the configuration information of the basic indicator is specifically the data stored in the source data table. In the embodiments of the present application, the SAP system determines whether there is a parameter error in the configuration set according to a preset parameter abnormality determination rule, and determines whether there is data abnormality in the obtained data according to a preset data abnormality determination rule. When it is determined that there is a parameter error and / or it is determined that there is data abnormality, step A200 will not be continued.
[0111] Through the built-in exception handling mechanism, the embodiments of the present application ensure that parameter errors and / or data anomalies can be captured and processed during data extraction and calculation, avoiding calculation interruption and providing error prompts, thus enhancing the efficient and reliable real-time data processing ability in complex business scenarios.
[0112] The following uses a specific application example to explain the index analysis method provided by the embodiments of the present application.
[0113] As Figure 3 shown, the SAP system includes the SAP HANA platform, the SAP HANA database, and SAP SLT. Among them, SAP S / 4HANA is an Enterprise Resource Planning (ERP) solution based on the SAP HANA platform, integrating core business processes and related data, and supporting real-time transactions and data analysis. SAP BW / 4HANA is a data warehouse solution based on SAP HANA for enterprise-level data management and analysis, and its architecture includes an E layer (Extraction Layer), a P layer (Persistent Staging Area, PSA), a D layer (Data Transformation Layer), and an application layer (Application Layer).
[0114] Specifically, SAP BW / 4HANA includes a BW E-layer physical library and a HANA VIEW (calculation view). The HANA VIEW includes an HV E layer, an HV L layer, an HV A layer, and an index configuration library. Among them, the BW E-layer physical library is used to replicate the original data in the source system library of the business system in real time through SAP SLT; the HV E layer is used to model based on the BW E-layer physical library to perform data governance on the original data in the source system library; the HV L layer is used to integrate and govern the data of the HV E layer to form business data objects; the HV A layer is used to model based on the HV L layer and the index configuration library to obtain index outputs (which can receive dynamic parameters, such as index codes, dimensions, key values, conditions, sorting); the index configuration library is used to store the configuration information of the index and parse and generate target SQL query statements.
[0115] The index configuration platform is a financial intelligence analysis platform, including an index configuration module, a metadata module, and an API module. Among them, the index configuration module is used to generate configuration information according to user input, the metadata module includes multiple metadata for obtaining the view structure of the HV A layer of SAP BW / 4HANA, and the API module includes multiple APIs for providing interfaces for the index configuration platform to output data externally.
[0116] The visualization platform is the FineBI visualization analysis platform. Users can call the API interface through this platform to pass compliant parameters to the metric configuration platform.
[0117] The schematic diagram of the process for implementing metric analysis in this example is as Figure 4 shown below. The working content of each process node in this figure will be described below. Among them, the visualization platform is the user of the metrics and can request specific data according to specific requirements. The performance is to request different data through various parameters of the API. The metric configuration platform is the definer of the metrics, and the rules of these metrics will be synchronized to the HANA system in real time after being released. The HV A layer model is the logical implementation layer that dynamically calculates the metric calculation results by combining the specific request parameters of the user and the metric rules in HANA. The HV L layer is the data semantic layer created by synchronizing the data of the source system.
[0118] Step 1: Each group of metrics in the analysis report (for specific business applications) of the visualization platform sends a data request to the metric configuration platform through a pre-constructed API. In principle, one API corresponds to one sub-business domain because the sub-business domain determines all analysis dimensions. Step 2: Each API passes a data request with dynamic parameters through metadata, where the parameters include but are not limited to multiple metrics, dimensions, key values, conditions, and sorting. Step 3: Find the corresponding HV A layer model (which can be flexibly constructed by technical personnel according to the application scenario) through the metadata and input the parameter information brought over. Step 4: The HV A layer model dynamically assembles the target SQL query statement based on the obtained parameters and the metric configuration library and sends a request to the HV L layer to request business data object data. Step 5: The HV L layer requests basic business detail data from the relevant HV E layer. Step 6: The HV E layer requests the specific data required from the physical library of the BW E layer. Step 7: The physical library of the BW E layer obtains the specific data required from the source system library, calculates the metric calculation results based on the obtained data, and feeds them back to the visualization platform for display.
[0119] This example provides real-time calculation services for basic metrics and composite metrics through the API interface, supports the input of multiple metric calculation parameters (such as metric codes, organizational structure codes, dates, Where conditions, Group By conditions, Order By sorting conditions), and meets the enterprise's flexible query and calculation requirements for metrics. Users call the API interface through the usage end (tools such as FineBI) and pass in a compliant configuration set. The API validates the parameters in the configuration set according to the predetermined specifications. If it is found that the preset requirements are not met, the method will return an error message and prompt that the parameter settings are incorrect to ensure the accuracy of parameter input and the stability of operations.
[0120] This method opens the real-time metric calculation function to users through a set of API interfaces, supports the passing of complex metric calculation parameters, and can meet the diverse analysis needs of enterprises. Dynamically generate corresponding metric calculation logic and SQL query statements according to user input, which can ensure meeting the requirements of complex business scenarios in terms of flexibility and performance.
[0121] It can be seen that for the metric analysis method provided by the embodiments of this application, after obtaining the configuration set generated based on user operations, by performing hierarchical metric calculations in accordance with the preset logical order, the accuracy and consistency of the metric calculation results of each metric are guaranteed. This method can process multiple independent basic metrics simultaneously and process nested composite metrics with dependencies serially, ensuring that the metric calculation results meet the parameter requirements of users, and improving the stability of the method and the reliability of data processing.
[0122] This method is based on the dynamic implementation method of the SAP system, which greatly improves the real-time calculation performance of large-scale data and the flexibility of metric configuration. Specifically, starting from user configuration, this method passes requests to the SAP system through API interfaces, dynamically generates and executes target SQL query statements. After calculation, integrate relevant data of basic metrics and composite metrics as needed, and finally return to the user side (i.e., the visualization platform). This method not only optimizes the enterprise's data management process but also provides users with powerful real-time calculation and analysis tools, especially showing significant advantages when dealing with complex metric configurations and calculations in a big data environment.
[0123] This method combines the front-end display of the organizational structure and metrics, performs specific business processing in the background, designs and maintains the real-time metric business logic (including the definition of metric calculation parameter information and metric calculation logic), synchronizes it to the SAP system for real-time metric analysis, determines the metric calculation results, and finally displays the metric calculation results in real time to meet the enterprise's needs for real-time analysis of large-scale data, year-on-year and month-on-month analysis, flexible configuration, and instant feedback, and can provide real-time metric data for the enterprise, improving data timeliness and accuracy.
[0124] Figure 1 It is a schematic flowchart of the metric analysis method in an embodiment. It should be understood that although Figure 1 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 1At least some of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential but can be executed alternately or in turn with at least some of the other steps or sub-steps or stages of the other steps.
[0125] Figure 5 FIG. schematically shows a flowchart of the index analysis method according to an embodiment of the present application. As Figure 5 shown, in an embodiment of the present application, an index analysis method is provided, which is applied to an index configuration platform. The index configuration platform is connected to an SAP system and a visualization platform. The method may include the following steps.
[0126] Step B200, when it is monitored that a user initiates an index analysis request, generate a configuration set.
[0127] Wherein, the configuration set includes the target indexes selected by the user and the configuration information of the target indexes. The target indexes are divided into basic indexes and composite indexes, and the composite indexes are associated with at least one basic index. Specifically, the configuration information of the basic index includes index calculation parameter information and index calculation logic, the configuration information of the composite index includes index calculation logic, the index calculation parameter information includes index calculation parameters and their parameter values, and the index calculation logic includes key values and operators.
[0128] In an embodiment of the present application, the index configuration platform provides an operable interface. The user selects which indexes to be used as target indexes on the operable interface and configures the index calculation logic / and index calculation parameter information of the target indexes in the operable interface.
[0129] In a specific example, a button for indicating the initiation of an index analysis request is set in the operable interface of the index configuration platform. When it is monitored that the user clicks the button, it means that the user initiates an index analysis request.
[0130] In an embodiment of the present application, before step B200 for generating the configuration set, the method further includes the following steps.
[0131] Step B110, determine the current working mode of the index configuration platform.
[0132] Wherein, the current working mode is a formal mode or a simulation mode.
[0133] Specifically, in an embodiment of the present application, the index configuration platform has two working modes: a simulation mode (FZ) and a formal mode (ZS). Among them, FZ represents calculating the indexes in the configuration, and ZS represents calculating the indexes whose index calculation logic has been confirmed, that is, calculating the published formal indexes.
[0134] Step B120: If the current working mode is the formal mode, display the pre-set formal metrics in the operable interface of the metric configuration platform; if the current working mode is the simulation mode, display the pre-set informal metrics in the operable interface of the metric configuration platform.
[0135] Among them, the metric calculation logic of the formal metrics (including formal basic metrics and formal composite metrics) is pre-set, and the metric calculation logic of the informal metrics (including informal basic metrics and informal composite metrics, i.e., simulation basic metrics and simulation composite metrics) needs to be configured by the user himself. In the simulation mode, the user can perform flexible metric dynamic expansion, such as defining new metrics as informal metrics (metric coding, metric calculation logic, etc.).
[0136] In the embodiment of the present application, as Figure 6 shown, when configuring metrics in the metric configuration platform, the configuration of the basic metrics is displayed in two configuration tables, namely the configuration table up to the key value level (the table formed based on the key values of the formal basic metrics as Figure 7 shown), and the configuration table up to the HV L layer model level (corresponding to the non-key value configuration table of the basic metrics in the figure); the configuration of the composite metrics is displayed in one configuration table, which is the configuration table up to the key value level.
[0137] In the embodiment of the present application, when the metric configuration platform generates the configuration set, the configuration set will be synchronously updated to the SAP system in real time, so that the SAP HANA database in the SAP system can directly use the user-defined configuration content, thereby achieving efficient cross-platform data synchronization and calculation.
[0138] In the embodiment of the present application, the working mode of the metric configuration platform can be manually switched between the simulation mode and the formal mode. When the current working mode of the metric configuration platform is the simulation mode, the user can configure the metric calculation logic in real time and view the metric calculation results in real time in the visualization platform. The user can flexibly adjust the metric calculation logic according to the feedback results, improving the flexibility of the configuration. This working mode is applicable to the metric development and testing phases. When the current working mode of the metric configuration platform is the formal mode, the metric calculation logic of the metric is not allowed to be changed arbitrarily. The user can view the metric calculation results in real time in the visualization platform to ensure stable operation in the formal environment and prevent unauthorized modifications. It can be seen that in the embodiment of the present application, by supporting the switching between the simulation mode and the formal mode, the user can intuitively manage and control the metric configuration, ensuring the accuracy and availability of the metric, and at the same time guaranteeing the security and stability of the system during formal operation. In the embodiment of the present application, by distinguishing between the simulation mode and the formal mode, the SAP system obtains the metric calculation logic from the logical tables corresponding to the simulation mode or the formal mode respectively, ensuring the flexibility and accuracy of the metric calculation.
[0139] In the embodiment of the present application, step B200 may include the following steps.
[0140] Step B210, when it is monitored that the user initiates a metric analysis request, if the current working mode is the formal mode, determine the formal metric selected by the user in the operable interface of the metric configuration platform as the target metric; if the current working mode is the simulation mode, determine the informal metric selected by the user in the operable interface of the metric configuration platform as the target metric.
[0141] Step B220, generate the configuration set based on the configuration information of each target metric in the operable interface of the metric configuration platform.
[0142] In the embodiment of the present application, the metric configuration platform transmits the generated configuration set to the SAP system in real time according to the current working mode, so that the SAP system stores and parses the configuration set, and then performs hierarchical calculations on the parsed basic metrics and composite metrics to obtain the metric calculation results of each target metric.
[0143] Step B300, send the configuration set to the SAP system, so that the SAP system determines the metric calculation results of the basic metrics according to the configuration information of the basic metrics, determines the metric calculation results of the composite metrics according to the configuration information of the composite metrics and the metric calculation results of the associated basic metrics, and sends the metric calculation results of each metric fed back by the SAP system to the visualization platform for display.
[0144] In the embodiments of the present application, after the user flexibly configures the metrics and their configuration information on the custom-developed metric configuration platform, the metric calculation logics of each metric will be synchronously updated to the SAP HANA database of the SAP system in real time, so that the SAP HANA database can quickly respond to the user's metric calculation requirements. The SAP system can dynamically extract the corresponding metric calculation logic from the logical table according to the I_KPI parameter of the metric selected by the user, and efficiently calculate each target metric to obtain the metric calculation results of each target metric.
[0145] It can be seen that in the metric analysis method provided by the embodiments of the present application, after the user generates a configuration set by operating on the metric configuration platform, by performing hierarchical metric calculation in real time according to the preset logical order, the accuracy, consistency, and real-time performance of the metric calculation results of each metric are guaranteed. This method can process multiple independent basic metrics simultaneously and serially process nested composite metrics with dependencies to ensure that the metric calculation results meet the user's parameter requirements, improving the stability of the method and the reliability of data processing.
[0146] Figure 8 Schematically shows the structural block diagram of the metric analysis device in the embodiments of the present application. As Figure 8 shown, in an embodiment of the present application, a metric analysis device is provided, configured in the SAP system. The SAP system is connected to a metric configuration platform, and the metric configuration platform is connected to a visualization platform. The metric analysis device may include the following functional modules.
[0147] A configuration acquisition module, configured to acquire a configuration set generated by the metric configuration platform in response to a metric analysis request initiated by the user. Wherein, the configuration set includes the target metrics selected by the user and the configuration information of the target metrics. The target metrics are divided into basic metrics and composite metrics, and the composite metrics are associated with at least one basic metric.
[0148] A first metric analysis module, configured to determine the metric calculation result of each basic metric according to the configuration information of the basic metric.
[0149] A second metric analysis module, configured to determine the metric calculation result of each composite metric according to the configuration information of the composite metric and the metric calculation results of its associated basic metrics.
[0150] An analysis result display module, configured to send the metric calculation results of each metric to the metric configuration platform, so that the metric configuration platform sends the metric calculation results of each metric to the visualization platform for display.
[0151] In the embodiments of the present application, the configuration information of the basic indicators includes indicator calculation parameter information and indicator calculation logic, and the indicator calculation parameter information includes indicator calculation parameters and their parameter values. The first indicator analysis module may include the following functional modules.
[0152] A query statement generation unit, configured to generate a target SQL query statement corresponding to each basic indicator according to the configuration information of the basic indicator.
[0153] A first indicator analysis unit, configured to execute the target SQL query statement corresponding to each basic indicator to obtain the SQL query result corresponding to the basic indicator, and determine the indicator calculation result of the basic indicator according to the indicator calculation logic of the basic indicator and the corresponding SQL query result.
[0154] In the embodiments of the present application, the query statement generation unit is specifically configured to:
[0155] For each basic indicator, if it is determined that the indicator calculation parameters of the basic indicator include a same-cycle value identifier, generate a first SQL query statement and a second SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator. Wherein, the parameter value of the same-cycle value identifier is the same period and / or cycle period, and the target SQL query statement corresponding to the basic indicator includes the first SQL query statement and the second SQL query statement corresponding to the basic indicator.
[0156] For each basic indicator, if it is determined that the indicator calculation parameters of the basic indicator do not include a same-cycle value identifier, generate a target SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator.
[0157] Since the indicator analysis device provided in the embodiments of the present application is a virtual device corresponding to the indicator analysis method in the above embodiments, it can also solve the problem that it is difficult to meet the enterprise requirements for the timeliness and accuracy of indicator analysis in a large-scale data environment in the prior art.
[0158] Figure 9 Schematically shows the structural block diagram of the indicator analysis device in the embodiments of the present application. As Figure 9 shown, in an embodiment of the present application, an indicator analysis device is provided, configured in an indicator configuration platform, the indicator configuration platform is connected to an SAP system and a visualization platform, and the indicator analysis device may include the following functional modules.
[0159] A configuration generation module, configured to generate a configuration set when it is monitored that a user initiates an indicator analysis request. Wherein, the configuration set includes the target indicators selected by the user and the configuration information of the target indicators, the target indicators are divided into basic indicators and composite indicators, and the composite indicators are associated with at least one basic indicator.
[0160] A configuration sending module is configured to send the configuration set to the SAP system, so that the SAP system determines the index calculation results of the basic indexes according to the configuration information of the basic indexes, determines the index calculation results of the composite indexes according to the configuration information of the composite indexes and the index calculation results of the associated basic indexes, and sends the index calculation results fed back by the SAP system to the visualization platform for display.
[0161] In the embodiment of the present application, the device further includes the following functional modules.
[0162] A working mode determination module is configured to determine the current working mode of the index configuration platform. Wherein, the current working mode is a formal mode or a simulation mode.
[0163] An index display module is configured to, if the current working mode is the formal mode, display the preset formal indexes in the operable interface of the index configuration platform. If the current working mode is the simulation mode, display the preset informal indexes in the operable interface of the index configuration platform. Wherein, the index calculation logic of the formal indexes is preset, and the index calculation logic of the informal indexes is configured by the user.
[0164] In the embodiment of the present application, the configuration generation module may include the following functional modules.
[0165] A target index determination unit is configured to, when it is monitored that the user initiates an index analysis request, if the current working mode is the formal mode, determine the formal indexes selected by the user in the operable interface of the index configuration platform as target indexes. If the current working mode is the simulation mode, determine the informal indexes selected by the user in the operable interface of the index configuration platform as target indexes.
[0166] A configuration generation unit is configured to generate the configuration set based on the configuration information of each target index in the operable interface of the index configuration platform.
[0167] Since the index analysis device provided in the embodiment of the present application is a virtual device corresponding to the index analysis method in the above embodiment, it can also solve the problem that in the prior art, the timeliness and accuracy of index analysis are difficult to meet the requirements of enterprises in a large-scale data environment.
[0168] The embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the index analysis method described in the above embodiment.
[0169] The electronic device provided by the embodiment of the present application includes a processor capable of running the index analysis method of the foregoing embodiment, and thus can also solve the problem in the prior art that it is difficult to meet the enterprise requirements in terms of timeliness and accuracy of index analysis in a large-scale data environment.
[0170] The embodiment of the present application provides a machine-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the processor is configured to execute the index analysis method described in the foregoing embodiment.
[0171] The machine-readable storage medium provided by the embodiment of the present application stores instructions for causing a machine to execute the index analysis method of the foregoing embodiment, and thus can also solve the problem in the prior art that it is difficult to meet the enterprise requirements in terms of timeliness and accuracy of index analysis in a large-scale data environment.
[0172] Figure 10 The internal structure diagram of the computer device according to the embodiment of the present application is schematically shown. As Figure 10 shown, in an embodiment of the present application, a computer device is provided, and the computer device may be a terminal. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, it realizes an index analysis method. The display screen A04 of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device A05 of the computer device may be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0173] Those skilled in the art can understand that Figure 10 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0174] In one embodiment, the index analysis device provided by the present application can be implemented in the form of a computer program, and the computer program can be in such asFigure 10 It runs on the computer device shown. In the memory of the computer device, each program module that makes up the index analysis device can be stored. The computer program composed of each program module enables the processor to execute the steps in the index analysis method of each embodiment of the present application described in this specification.
[0175] For example, Figure 10 the computer device shown can execute the step A100 through the configuration acquisition module in the index analysis device shown, the first index analysis module executes the step A200, the second index analysis module executes the step A300, and the analysis result display module executes the step A400. Figure 8
[0176] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0177] Figure 1 The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, as well as the combination of flows and / or blocks in the flowchart and / or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more flows and / or blocks one or more blocks.
[0178] Figure 1 These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more flows and / or blocks one or more blocks.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0180] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0181] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0182] Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0183] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent in such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the element.
[0184] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An index analysis method, characterized in that, Applied to an SAP system, the SAP system is connected to an indicator configuration platform, and the indicator configuration platform is connected to a visualization platform. The method includes: Obtain a configuration set generated by the indicator configuration platform in response to an indicator analysis request initiated by a user; wherein, the configuration set includes target indicators selected by the user and configuration information of the target indicators. The target indicators are divided into basic indicators and composite indicators, and the composite indicators are associated with at least one basic indicator; For each basic indicator, determine the indicator calculation result of the basic indicator according to the configuration information of the basic indicator; For each composite indicator, determine the indicator calculation result of the composite indicator according to the configuration information of the composite indicator and the indicator calculation results of the basic indicators associated therewith; Send the respective indicator calculation results to the indicator configuration platform, so that the indicator configuration platform sends the respective indicator calculation results to the visualization platform for display.
2. The method according to claim 1, wherein The configuration information of the basic indicator includes indicator calculation parameter information and indicator calculation logic. The indicator calculation parameter information includes indicator calculation parameters and their parameter values; For each basic indicator, determining the indicator calculation result of the basic indicator according to the configuration information of the basic indicator includes: For each basic indicator, generate a target SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator; For each basic indicator, execute the target SQL query statement corresponding to the basic indicator to obtain the SQL query result corresponding to the basic indicator, and determine the indicator calculation result of the basic indicator according to the indicator calculation logic of the basic indicator and the corresponding SQL query result.
3. The method according to claim 2, wherein For each basic indicator, generating a target SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator includes: For each basic indicator, if it is determined that the indicator calculation parameters of the basic indicator include a same-cycle value identifier, generate a first SQL query statement and a second SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator; wherein, the parameter value of the same-cycle value identifier is the same period and / or the cycle period, and the target SQL query statement corresponding to the basic indicator includes the first SQL query statement and the second SQL query statement corresponding to the basic indicator; For each basic indicator, if it is determined that the indicator calculation parameters of the basic indicator do not include a same-cycle value identifier, generate a target SQL query statement corresponding to the basic indicator according to the configuration information of the basic indicator.
4. A method for index analysis, characterized in that, Applied to an indicator configuration platform, the indicator configuration platform is connected to an SAP system and a visualization platform. The method includes: When it is monitored that a user initiates an indicator analysis request, generate a configuration set; wherein, the configuration set includes target indicators selected by the user and configuration information of the target indicators. The target indicators are divided into basic indicators and composite indicators, and the composite indicators are associated with at least one basic indicator; Send the configuration set to the SAP system, so that the SAP system determines the index calculation results of the basic metrics according to the configuration information of the basic metrics, determines the index calculation results of the composite metrics according to the configuration information of the composite metrics and the index calculation results of their associated basic metrics, and sends the index calculation results fed back by the SAP system to the visualization platform for display.
5. The method according to claim 4, wherein Before generating the configuration set when it is monitored that the user initiates an index analysis request, the method further includes: Determine the current working mode of the index configuration platform; wherein, the current working mode is the formal mode or the simulation mode; If the current working mode is the formal mode, display the preset formal metrics in the operable interface of the index configuration platform; wherein, the index calculation logic of the formal metrics is preset. If the current working mode is the simulation mode, display the preset informal metrics in the operable interface of the index configuration platform; wherein, the index calculation logic of the informal metrics is configured by the user.
6. The method according to claim 5, wherein When it is monitored that the user initiates an index analysis request and generates a configuration set, it includes: When it is monitored that the user initiates an index analysis request, if the current working mode is the formal mode, determine the formal metrics selected by the user in the operable interface of the index configuration platform as the target metrics; if the current working mode is the simulation mode, determine the informal metrics selected by the user in the operable interface of the index configuration platform as the target metrics. Generate the configuration set based on the configuration information of each target metric in the operable interface of the index configuration platform.
7. An index analysis device, characterized in that, Configured in the SAP system, the SAP system is connected to an index configuration platform, and the index configuration platform is connected to a visualization platform. The device includes: A configuration acquisition module, configured to acquire the configuration set generated by the index configuration platform in response to an index analysis request initiated by the user; wherein, the configuration set includes the target metrics selected by the user and the configuration information of the target metrics, the target metrics are divided into basic metrics and composite metrics, and the composite metrics are associated with at least one basic metric. A first index analysis module, configured to determine the index calculation result of each basic metric according to the configuration information of the basic metric. A second index analysis module, configured to determine the index calculation result of each composite metric according to the configuration information of the composite metric and the index calculation results of its associated basic metrics. An analysis result display module, configured to send each index calculation result to the index configuration platform, so that the index configuration platform sends each index calculation result to the visualization platform for display.
8. An index analysis device, characterized in that Configured in the index configuration platform, the index configuration platform is connected to the SAP system and the visualization platform. The device includes: A configuration generation module, configured to generate a configuration set when it is monitored that the user initiates an index analysis request; wherein, the configuration set includes the target metrics selected by the user and the configuration information of the target metrics, the target metrics are divided into basic metrics and composite metrics, and the composite metrics are associated with at least one basic metric. Configure a sending module to send the configuration set to the SAP system, so that the SAP system determines the index calculation results of the basic indicators according to the configuration information of the basic indicators, determines the index calculation results of the composite indicators according to the configuration information of the composite indicators and the index calculation results of the associated basic indicators, and sends the index calculation results fed back by the SAP system to the visualization platform for display.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the index analysis method described in any one of claims 1 to 3 or the index analysis method described in any one of claims 4 to 6.
10. A machine-readable storage medium having instructions stored thereon, characterized in that, When executed by the processor, the instruction causes the processor to be configured to execute the index analysis method described in any one of claims 1 to 3 or the index analysis method described in any one of claims 4 to 6.