Index calculation method and apparatus

By generating configurable files in spreadsheet software and using a database engine to calculate metrics, the problem of high maintenance difficulty in custom code is solved, and a logically clear and highly scalable metric calculation process is achieved.

CN114358596BActive Publication Date: 2026-02-06HANGZHOU EASTCOM SOFTWARE TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210004809.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2026-02-06
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

In existing technologies, custom code is difficult to maintain and struggles to efficiently handle the correlation calculation of multiple closely related indicator groups, resulting in high maintenance costs and poor scalability.

Method used

The system generates a configuration file using spreadsheet software, stores the calculation rules for the target indicator group, and uses a database engine to perform calculations, thus achieving a logically clear indicator calculation process.

Benefits of technology

It reduces maintenance difficulty, improves the scalability and applicability of the calculation process, avoids the read/write pressure and latency issues of centralized databases, and simplifies the indicator calculation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114358596B_ABST
    Figure CN114358596B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data calculation, and provides an index calculation method and device, which comprises the following steps: storing a plurality of target index groups generated by an electronic spreadsheet software and corresponding configurable files; wherein the configurable files represent the calculation rules of the values of the plurality of original indexes for determining the values of the business indexes in the corresponding target index groups; determining an index calculation request; wherein the index calculation request carries a target index group or the identification of the target index group; determining the values of the plurality of original indexes matched by the target index group; calling a database engine to calculate the values of the plurality of original indexes matched by the target index group based on the calculation rules indicated by the configurable file matched by the target index group, so as to determine the values of the business indexes in the target index group. The configurable file of the target index group is maintained by using the electronic spreadsheet software, the dimension difficulty is reduced, the calculation process of the business indexes is converted into the execution process of the database engine, and the extension is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data computing, and in particular to an index calculation method and device. BACKGROUND

[0002] In the field of data collection in the communication industry, a lot of resource, performance, load and other indicators are collected. These indicators usually do not appear alone, but appear or are collected together in a group of closely related indicators. The two-dimensional table structure composed of the group of indicators is called an indicator group. In order to support upper-layer business analysis, a plurality of indicator groups are usually associated to calculate a more meaningful target indicator group. Typical examples include resource backfilling and multi-table association.

[0003] At present, for each type of target indicator group, customized code is developed according to the characteristics of the target indicator group, and the values of each business indicator in the target indicator group are obtained by running the code.

[0004] However, the post-maintenance of the customized code is difficult. SUMMARY

[0005] The present application provides an index calculation method, device, computer readable storage medium and electronic equipment. The configurable file of the target indicator group is maintained by using a spreadsheet software, thereby reducing the difficulty of maintenance. In addition, the calculation process of the business indicators is converted into the execution process of the database engine, the logic is clear, and the applicability is very strong, thereby facilitating extension.

[0006] In a first aspect, the present application provides an index calculation method, comprising:

[0007] storing a plurality of configurable files corresponding to a plurality of target indicator groups generated by a spreadsheet software; wherein the configurable file indicates a calculation rule for determining the value of each business indicator in the corresponding target indicator group from the value of each of a plurality of original indicators;

[0008] determining an index calculation request; wherein the index calculation request carries a target indicator group or an identifier of the target indicator group;

[0009] determining the value of each of a plurality of original indicators matched by the target indicator group;

[0010] calling a database engine to calculate the value of each of the matched plurality of original indicators based on the calculation rule indicated by the configurable file matched by the target indicator group, and determining the value of each business indicator in the target indicator group.

[0011] In a second aspect, the present application provides an index calculation device, comprising:

[0012] A file storage module is configured to store a plurality of configurable files corresponding to a plurality of target indicator groups generated by a spreadsheet software, wherein the configurable files represent calculation rules for determining values of each business indicator in the corresponding target indicator group based on values of each original indicator.

[0013] A request determination module is configured to determine an indicator calculation request, wherein the indicator calculation request carries a target indicator group or an identifier of the target indicator group.

[0014] A field determination module is configured to determine values of each original indicator matched by the target indicator group.

[0015] An execution module is configured to invoke a database engine to calculate values of each business indicator in the target indicator group based on calculation rules indicated by the configurable file matched by the target indicator group.

[0016] In a third aspect, the present application provides a computer readable storage medium comprising execution instructions, when a processor of an electronic device executes the execution instructions, the processor executes the method according to any one of the first aspect.

[0017] In a fourth aspect, the present application provides an electronic device comprising a processor and a memory storing execution instructions, when the processor executes the execution instructions stored in the memory, the processor executes the method according to any one of the first aspect.

[0018] The present application provides an indicator calculation method, device, computer readable storage medium and electronic device. The method stores a plurality of configurable files corresponding to a plurality of target indicator groups generated by a spreadsheet software, wherein the configurable files represent calculation rules for determining values of each business indicator in the corresponding target indicator group based on values of each original indicator. Then, an indicator calculation request is determined, wherein the indicator calculation request carries a target indicator group or an identifier of the target indicator group. Then, values of each original indicator matched by the target indicator group are determined. Then, a database engine is invoked to calculate values of each business indicator in the target indicator group based on calculation rules indicated by the configurable file matched by the target indicator group. In summary, the technical solution of the present application maintains the configurable file of the target indicator group by using the spreadsheet software, which reduces the difficulty of dimension and saves human resources. In addition, the calculation process of the business indicator is converted into the execution process of the database engine, which has clear logic and strong applicability and is easy to extend.

[0019] Further effects of the above-mentioned non-conventional preferred modes will be described in the following in conjunction with the specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to make the present application or prior art solution more clearly understood, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative labor based on these drawings.

[0021] Figure 1 The flowchart of the index calculation method provided by the embodiment of the present application is shown in the figure.

[0022] Figure 2a The structural diagram of the calculation rule provided by the embodiment of the present application is shown in the figure.

[0023] Figure 2b The structural diagram of another calculation rule provided by the embodiment of the present application is shown in the figure.

[0024] Figure 3 The structural diagram of the storage system provided by the embodiment of the present application is shown in the figure.

[0025] Figure 4 The flowchart of another index calculation method provided by the embodiment of the present application is shown in the figure.

[0026] Figure 5 The diagram of the calculation rule configuration template provided by the embodiment of the present application is shown in the figure.

[0027] Figure 6a The diagram of the resource file 1 provided by the embodiment of the present application is shown in the figure.

[0028] Figure 6b The diagram of the resource file 2 provided by the embodiment of the present application is shown in the figure.

[0029] Figure 6c The diagram of the local dictionary provided by the embodiment of the present application is shown in the figure.

[0030] Figure 7 The diagram of the target index group provided by the embodiment of the present application is shown in the figure.

[0031] Figure 8 The structural diagram of the index calculation device provided by the embodiment of the present application is shown in the figure.

[0032] Figure 9 The structural diagram of the electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0034] like Figure 1 The diagram illustrates a method for calculating an indicator according to an embodiment of the present invention. This method can be applied to electronic devices, specifically servers or general computers. It should be noted that the electronic device can be understood as a service provider. In this embodiment, the method specifically includes the following steps:

[0035] Step 101: Store the configuration files corresponding to the multiple target indicator groups generated by the spreadsheet software; wherein, the configuration file represents the calculation rules for determining the values ​​of each business indicator in the corresponding target indicator group.

[0036] In this step, the calculation rules for the target indicator group are defined using a spreadsheet format, which facilitates understanding and maintenance.

[0037] As a feasible implementation method, electronic devices can determine several raw indicators through the following implementation methods:

[0038] The electronic device determines multiple sets of original indicators, and based on these sets, determines several sets of original indicators for calculating the target set of indicators, and uses the indicators in these sets as the original indicators.

[0039] It should be understood that during the data collection process of electronic devices, indicators do not appear singly, but rather as a group of closely related indicators. These multiple closely related indicators can be called the raw indicator group. For example, when acquiring device information, a table is generated every 5 minutes, and the multiple indicators in this table constitute a raw indicator group. In addition, there may be multiple raw indicators that are unrelated to the business indicators in the target indicator group, but are inseparable from the data collection process.

[0040] In practical applications, there are usually multiple values ​​for the original indicator. If the values ​​of the original indicator are stored in a table, then the values ​​of the original indicator can be understood as the content other than the field names in the fields of the original indicator.

[0041] As a feasible implementation method, the calculation rule indicates the calculation method for obtaining the values ​​of each business indicator in the target indicator group from the values ​​of multiple original indicators.

[0042] like Figure 5As shown, in one example, the calculation rule may include the following parts:

[0043] Part 1: Target Metric Group Configuration. The target metric group configuration can be understood as defining the first basic information of the target metric group. For example, the first basic information may include storage type, data granularity, data category, display name, etc., which need to be determined based on actual needs; this embodiment does not impose specific limitations on this.

[0044] Part Two: Intermediate Table Configuration and Intermediate Field Configuration. Intermediate table configuration can be understood as defining the second basic information of the intermediate table. For example, the second basic information may include the table name, storage type, and the target metric group to which it belongs. Intermediate field configuration can be understood as defining the third basic information of the fields in the intermediate table. For example, the third basic information may include: field name, field type, and the intermediate table to which it belongs, etc. The specific details need to be determined based on actual requirements; this embodiment does not impose specific limitations on this.

[0045] Part Three: Business Metric Configuration and Mapping Rule Configuration. The business metric configuration mainly involves configuring the business field name, field type, maximum value, minimum value, source table (including the values ​​of multiple original metrics), and source field, etc. The specific configuration needs to be determined based on actual requirements; this embodiment does not impose specific limitations on this.

[0046] Furthermore, such as Figure 2a As shown, the calculation rules can include simple calculations, association of multiple original indicator groups, intermediate table views, and view merging. An intermediate table view can be understood as a table containing the field names and corresponding values ​​configured in the intermediate table; view merging can be understood as merging different intermediate table views into a single view. It should be noted that, considering a single original indicator group cannot calculate all the business indicators in the target indicator group, it is necessary to associate multiple original indicator groups, i.e., merge the indicators from multiple original indicator groups.

[0047] In one example, such as Figure 2b As shown, simple operations can be understood as filtering, derivation, renaming, reordering, and projection. Filtering can be understood as selecting the desired metric values, derivation as copying the desired metric values, projection as generating business metrics in a target metric group based on the original metrics, renaming as changing the metric's name, and reordering as changing the metric's order.

[0048] It should be noted that if the calculation rules only include simple operations, there is no need to configure the intermediate table and the fields in the intermediate table.

[0049] Therefore, the embodiment mainly realizes the calculation rules of the two categories. The first category is that the target index group is obtained through simple operation of multiple original indexes. Correspondingly, the business indexes in the target index group and the original indexes have the same meaning, but the names are different. The second category is that the target index group is obtained through a series of intermediate operations of multiple original indexes. Correspondingly, each business index in the target index group can be an index other than the original indexes. Or, part of the business indexes in the target index group can have the same meaning as the original indexes, and part of the business indexes can be other indexes than the original indexes.

[0050] As a feasible implementation manner, one worksheet represents the calculation rule of one target index group.

[0051] For example, the calculation rule is configured in the form of Excel, and each Sheet represents the calculation process of one target index group.

[0052] As a feasible implementation manner, the spreadsheet software is Excel software.

[0053] As a feasible implementation manner, the corresponding configurable files of the multiple target index groups are saved in a storage medium such as a hard disk, and can be repeatedly called.

[0054] As a feasible implementation manner, the multiple original indexes can be related indexes of a network device. For example, the network device can be a router, and the indexes of the router can be domain name, online user number, access restriction user number, user number of different services, charging success rate, address pool utilization rate, etc. The specific needs are determined in combination with actual needs, and the embodiment does not make specific limitation.

[0055] It is worth noting that considering that some indexes of the network device are private to the manufacturer, and only the device manufacturer knows the true meaning. Therefore, in the actual collection task, the data of the indexes can be collected based on the indexes provided by the device manufacturer, and the specific meaning of the indexes can be consulted from the device manufacturer.

[0056] It should be noted that the above network device is only an example and does not constitute a specific limitation. Any device capable of being connected can use the index calculation method provided in the embodiment, and the index calculation needs to be based on the related data of the collected connected device.

[0057] Step 102, determine the index calculation request; wherein the index calculation request carries a target index group or an identifier of the target index group.

[0058] When the business party needs to calculate the target indicator group, an indicator calculation request is initiated to the service provider (electronic device), which can be in the form of an HTTP request, for example. The indicator calculation request carries the target indicator group or the identifier of the target indicator group that needs to be calculated, so that the service provider (electronic device) can calculate the values of each business indicator in the target indicator group after receiving the request.

[0059] In actual applications, the naming of the configurable files of different target business groups is different, and therefore, the identifier of the target indicator group can be the naming of the configurable file. Correspondingly, the configurable file can be matched based on the identifier of the target indicator group.

[0060] Step 103: Determine the values of the multiple original indicators matched by the target indicator group.

[0061] As a feasible implementation manner, the values of the multiple original indicators matched by the target indicator group can be determined by the following implementation manner:

[0062] Determine a business file, wherein the business file includes the values of the multiple original indicators matched by the target indicator group; map the business file into a definition table in a database engine; call the database engine to read and parse the business file based on the definition table to determine the values of the multiple original indicators.

[0063] In this implementation manner, the mapping and association processing can avoid the problems of read-write pressure of the centralized database and data processing delay caused by centralized storage and subsequent scheduled calculation.

[0064] The database engine can be understood as a core service for storing, processing, and protecting data. The database engine can control access permissions and quickly process transactions to meet the requirements of processing a large amount of data. For example, the database engine is a SQL engine. Considering that the values of the multiple original indicators are usually stored in a remote system, the SQL engine is preferably a distributed SQL query engine, such as PrestoDB / PrestoSQL. Based on the extension mechanism of the Connector in PrestoDB / PrestoSQL, a read-only Connector supporting local and remote file systems is implemented to support the reading ability of data files stored in the file system.

[0065] It should be noted that in actual applications, the database engine creates an object for storing the definition table.

[0066] The mapping of the business file into the definition table in the database engine can be understood as mapping the business file into the definition table in the database engine according to the organization and structure of the database engine, so that the database engine can obtain and parse the business file based on the definition table.

[0067] In one example, the definition table includes a location of the business file and a content of the business file.

[0068] For example, the location of the business file can be a uniform resource locator. Correspondingly, the electronic device invokes the database engine to parse the uniform resource locator to read the business file and parse, to determine the respective values of the business indicators in the target indicator group.

[0069] For example, the content of the business file is used at least to indicate the location of the values of the plurality of original indicators in the business file. If the business file is an electronic spreadsheet file, the content of the business file is used at least to indicate the location of the respective fields of the plurality of original indicators in the business file.

[0070] It is worth noting that the business file can exist in a local database or a remote database. The local database can be understood as a database in the electronic device, and the remote database can be understood as a database in another electronic device.

[0071] Further, the definition table can also include a delimiter. It should be noted that the delimiter is used to parse the business file to extract the respective values of the plurality of original indicators. In some possible cases, if there is a special delimiter in the business file, in order to ensure that the business file can be parsed more accurately, it is necessary to define the delimiter.

[0072] In one example, the business file is a standard file. In other words, the content in the business file is standardized content.

[0073] For example, the business file can be determined by the following implementation manner:

[0074] a plurality of data standardization scripts corresponding to a plurality of target indicator groups are stored; an original business file is determined; wherein the original business file includes at least a plurality of original indicators matched with the target indicator group; the data standardization script matched with the target indicator group is executed to standardize the content of the original business file, to determine the business file.

[0075] It should be noted that considering that the respective values of the plurality of original indicators in the target indicator group are from different sources (such as different equipment manufacturers), the data organization format, the numerical unit, the data type, and the like can have different specifications, and therefore need to be standardized. The respective values of the plurality of original indicators in different target indicator groups are from different sources, and therefore, the data standardization scripts corresponding to the respective target indicator groups need to be stored.

[0076] The data standardization script is used to standardize the content of different original business files, and generally needs to standardize the values of multiple original indicators in different original business files. For example, the standardization can be in the form of unified units, unified decimal points, unified time expressions, and missing value supplementation.

[0077] It is worth noting that the data standardization script is generally saved in the form of a file in a storage medium such as a hard disk, and therefore, the data standardization script is not a temporary file and can be repeatedly called as needed.

[0078] The code written in the script language in the data standardization script realizes data standardization. The script language referred to herein can be any one of JavaScript, Shell, Python, Perl, and the like, and can be determined in combination with actual needs, and the present embodiment does not make a specific limitation thereto.

[0079] Further, if a business file matching the target indicator group has been stored, there is no need to determine the business file in the above manner, and in the subsequent process, the business file can be directly called.

[0080] In step 104, the database engine is called to calculate the values of the multiple original indicators based on the calculation rules indicated by the configurable file matching the target indicator group, to determine the values of the business indicators in the target indicator group.

[0081] In this step, various complex conversion processing problems in the indicators are uniformly converted into the execution process of the database engine, the logic is clear, and the applicability is very strong, facilitating extension.

[0082] As a feasible implementation manner, based on the configurable file matching the target indicator group, an executable statement corresponding to the database engine is generated; the database engine is called to execute the executable statement to calculate the values of the multiple original indicators, to determine the values of the business indicators in the target indicator group.

[0083] The executable statement generally includes multiple statements, and these statements are used to read the values of the multiple original indicators and calculate them according to the calculation rules matching the target indicator group.

[0084] In one example, the database engine is an SQL engine, and the executable statement is an SQL statement.

[0085] In one example, the calculation rules indicated by the configurable file include multiple intermediate indicators; correspondingly, the database engine is called to execute the executable statement to calculate the values of the multiple original indicators, to determine the values of the multiple intermediate indicators; based on the values of the multiple intermediate indicators, the values of the business indicators in the target indicator group are determined.

[0086] It should be noted that the executable statement is stored in the memory, the database engine obtains the execution result by calling and executing the executable statement stored in the memory, and stores the execution result in the memory.

[0087] Further, the values of each business indicator in the target indicator group are stored, and the content generated in the process of deleting the executable statement executed by the database engine is deleted.

[0088] It should be understood that after the indicator calculation is completed, the content generated in the calculation process is deleted, and the environment is destroyed. For example, the content can include multiple original indicators, a target indicator group, a view corresponding to the target indicator group, an intermediate table view, and a definition table.

[0089] As shown in Figure 3 , the values of each business indicator in the target indicator group can be stored in other electronic devices, thereby facilitating subsequent calling when needed. Here, the other electronic devices can be a server, a server cluster, a file storage system, etc., and the present embodiment does not make specific limitations thereon, and the specific needs are determined in combination with actual needs.

[0090] Through the above technical solutions, the beneficial effects of the present embodiment are:

[0091] The configurable file of the target indicator group is maintained by the spreadsheet software, which reduces the difficulty of dimension. In addition, the calculation process of the business indicator is converted into the execution process of the database engine, which has clear logic and strong applicability, and is convenient for expansion.

[0092] Figure 1 As shown in the above embodiment, only the basic embodiment of the method of the present application is described, and on the basis of the basic embodiment, certain optimization and expansion can also obtain other preferred embodiments of the method. The present embodiment is based on the foregoing embodiments, and is more specifically described in combination with application scenarios.

[0093] The specific scenario combined by the present embodiment is that the spreadsheet software is Excel, the database engine is PrestoDb / PrestoSQL, the multiple original indicators Figure 6a , Figure 6b and Figure 6cThe IP MAN network Huawei ME60 BRAS device related indicators, domain name (Domain name), state (State), CAR (domain name type), access limit user number (Access-limit), online user number (Online), BOD service user number (BODNum), RptVSM service user number (RptVSMNum), Internet Protocol version 4 user number (IPv4), (Internet Protocol version 6 user number (IPv6) and simultaneous use of Internet Protocol version 4 and version 6 user number (Dual), user type (Type), network model (Model), collect IP MAN network Huawei ME60 BRAS device related indicators Data is stored in the form of resource files and local dictionary tables, and the three service indicators in the target indicator group are Figure 7 The user type (use Type), total user number (Total user), Ipv4 user number (Ipv4), Ipv6 user number (Ipv6) are shown. Figure 5 The calculation rule configuration template generates the calculation process rule Sheet table of the target indicator group.

[0094] In addition, the BOD (Bandwidth on Demand) service is a value-added service that dynamically allocates bandwidth to users. When users have bandwidth adjustment needs, they can choose BOD services through Portal Server self-service, and the service is dynamically activated and cancelled. The operator does not need to change the configuration to complete the bandwidth change, and also provides the operator with a more flexible service-based billing method. The specific meaning of RptVSM service can be consulted with the equipment manufacturer.

[0095] As Figure 4 shown, the specific implementation steps are as shown:

[0096] 1) Relying on distributed SQL query engine PrestoDB / PrestoSQL, create an empty Schema.

[0097] 2) Get device information, generate a resource file 1 Figure 6a every 5 minutes, generate a resource file 2 as Figure 6b , the local dictionary table file as Figure 6c shown, and map the resource file and the local dictionary table file to the definition table, that is, the PrestoDB / PrestoSQL table.

[0098] 3) Determine the calculation process rule Sheet table of the target indicator group generated by the calculation rule configuration template as Figure 5 shown.

[0099] 4) Call the defined calculation process rule Sheet table to indicate the calculation rule to generate the target indicator group table as shown in Figure 7 .

[0100] 5) Save the generated target indicator group table as shown in Figure 7 .

[0101] 6) Delete all tables, charts, data and Schema, that is, destroy the environment.

[0102] It should be noted that since the person who configures the calculation process rule Sheet table knows the rules of the mapping definition table, the content in the calculation process rule Sheet table and the content of the definition table are adapted.

[0103] The beneficial effects of the embodiment are as follows:

[0104] Firstly, the calculation rules of the target indicator group are defined based on Excel, which is convenient for understanding and maintenance.

[0105] Secondly, various complex conversion processing problems in the indicators are uniformly converted into the execution process of the database engine, the logic is clear, and the applicability is very strong, which is convenient for extension.

[0106] Thirdly, the mapping association processing is performed before the data enters the database, which avoids the centralized database read-write pressure and data processing delay problem caused by the centralized data storage and then the scheduled calculation.

[0107] Based on the same concept as the method embodiment of the present application, please refer to Figure 8 , the embodiment of the present application also provides an indicator calculation device, which comprises:

[0108] A file storage module 801 is configured to store a plurality of target indicator groups respectively corresponding to a plurality of configurable files generated by an electronic spreadsheet software; wherein the configurable file indicates the calculation rule of the value of each business indicator in the corresponding target indicator group from the value of each original indicator.

[0109] A request determination module 802 is configured to determine an indicator calculation request; wherein the indicator calculation request carries a target indicator group or an identifier of the target indicator group.

[0110] A data determination module 803 is configured to determine the value of each original indicator matched by the target indicator group.

[0111] An execution module 804 is configured to call a database engine to calculate the value of each business indicator in the target indicator group based on the calculation rule indicated by the configurable file matched by the target indicator group.

[0112] As a feasible implementation manner, the data determination module 803 comprises a file determination unit, a mapping unit and a reading and analyzing unit, wherein

[0113] The file determination unit is configured to determine a service file, wherein the service file comprises values of a plurality of original indexes matched with the target index group;

[0114] The mapping unit is configured to map the service file into a definition table in the database engine;

[0115] The reading and analyzing unit is configured to call the database engine to read and analyze the service file based on the definition table, and determine the values of the plurality of original indexes.

[0116] As a feasible implementation manner, the apparatus further comprises a definition table deletion module, wherein

[0117] The definition table deletion module is configured to delete the definition table after determining the values of the respective service indexes in the target index group.

[0118] As a feasible implementation manner, the definition table comprises a uniform resource locator of the service file.

[0119] The reading and analyzing unit is configured to call the database engine to analyze the uniform resource locator of the service file in the definition table, and read the service file.

[0120] As a feasible implementation manner, the definition table further comprises a delimiter of the service file.

[0121] The reading and analyzing unit is further configured to call the database engine to analyze and read the service file based on the delimiter of the service file in the definition table.

[0122] As a feasible implementation manner, the apparatus further comprises a script storage module.

[0123] The script storage module is configured to store a plurality of data standardization scripts corresponding to the respective target index groups.

[0124] The file determination unit comprises a file determination subunit and a standardization subunit, wherein

[0125] The file determination subunit is configured to determine an original service file, wherein the original service file comprises at least values of a plurality of original indexes matched with the target index group;

[0126] The standardization subunit is configured to perform standardization processing on the content of the original service file based on a data standardization script matched with the target index group, and determine a service file.

[0127] As a feasible implementation manner, the file determination unit is configured to store a service file corresponding to each of the partial target indicator groups in the plurality of target indicator groups; and determine the service file matched with the target indicator group.

[0128] As a feasible implementation manner, the calculation rule includes a plurality of intermediate indicators between a plurality of original indicators and the corresponding target indicator group.

[0129] The execution module 804 is configured to invoke the database engine to calculate the value of each of the matched plurality of original indicators based on the calculation rule indicated by the configurable file matched with the target indicator group, to determine the field of each of the plurality of intermediate indicators; and to determine the value of each of the business indicators in the target indicator group based on the field of each of the plurality of intermediate indicators.

[0130] As a feasible implementation manner, the visual configurable file is modified and reconfigured after being opened by the spreadsheet software.

[0131] As a feasible implementation manner, the database engine is a SQL engine.

[0132] As a feasible implementation manner, the spreadsheet software is Excel software.

[0133] As a feasible implementation manner, the device further includes a saving module and an environment destruction module; wherein,

[0134] The saving module is configured to save the value of each of the business indicators in the target indicator group.

[0135] The environment destruction module is configured to delete the content generated in the process of calculating the value of each of the matched plurality of original indicators by the database engine based on the calculation rule indicated by the configurable file matched with the target indicator group.

[0136] Figure 9Fig. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. At the hardware level, the electronic device comprises a processor 901 and a memory 902 storing execution instructions, and optionally further comprises an internal bus 903 and a network interface 904. The memory 902 can contain an internal memory 9021, such as a random-access memory (RAM), and can also contain a non-volatile memory 9022, such as at least one disk memory. The processor 901, the network interface 904 and the memory 902 can be connected to each other through the internal bus 903, which can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The internal bus 903 can be divided into an address bus, a data bus, a control bus, and the like, and is represented by only one bidirectional arrow for the sake of convenience, Figure 9 Of course, the electronic device can also comprise other hardware required by businesses. When the processor 901 executes the execution instructions stored in the memory 902, the processor 901 executes the method in any one of the embodiments of the present application, and is at least used to execute the method as shown in Figure 1 or Figure 4 .

[0137] In one possible implementation manner, the processor reads the corresponding execution instructions from the non-volatile memory into the internal memory and then runs, and can also obtain the corresponding execution instructions from other devices, to form an index calculation apparatus at the logical level. The processor executes the execution instructions stored in the memory, to implement the index calculation method provided in any one of the embodiments of the present application through the executed execution instructions.

[0138] The processor can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor.

[0139] The embodiment of the present application further provides a computer readable storage medium, including execution instructions, when a processor of an electronic device executes the execution instructions, the processor executes the method provided in any one of the embodiments of the present application. The electronic device can be specifically the electronic device as shown in the Figure 9 The execution instructions are a computer program corresponding to the index calculation device.

[0140] Those skilled in the art should understand that the embodiments of the present application can be provided as a method or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.

[0141] Each embodiment in the present application is described in a progressive manner, and the same and similar parts of each embodiment can be referred to each other, and each embodiment mainly explains the difference from other embodiments. Especially, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the part of the method embodiment.

[0142] It should be further noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, product or equipment. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional same elements in the process, method, product or equipment including the element.

[0143] The above merely provides the embodiments of the present application but are not intended to limit the present application. Based on the embodiments of the present application, those skilled in the art can make various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall fall into the scope of claims of the present application.

Claims

1. A method for calculating an index, characterized in that, include: The storage spreadsheet software generates multiple target indicator groups, each corresponding to a specific configuration file; wherein, the configuration file represents the calculation rules for determining the values ​​of each business indicator in the corresponding target indicator group based on the values ​​of the multiple original indicators. Determine the indicator calculation request; wherein, the indicator calculation request carries the identifier of the target indicator group or the target indicator group; Determine the values ​​of each of the multiple original indicators matched by the target indicator group; The database engine is invoked to calculate the values ​​of each of the multiple matched original indicators based on the calculation rules indicated by the configuration file matching the target indicator group, thereby determining the values ​​of each business indicator in the target indicator group. The process of calling the database engine to calculate the values ​​of each of the matched raw indicators based on the calculation rules indicated by the configurable file matching the target indicator group includes: Based on the configuration file matched by the target indicator group, generate an executable statement corresponding to the database engine; call the database engine to execute the executable statement and calculate the values ​​of each of the matched original indicators; Determining the values ​​of each of the multiple original indicators matched by the target indicator group includes: Determine the business file; wherein, the business file includes the values ​​of each of the multiple original indicators matched by the target indicator group; Map the business files to definition tables in the database engine; The database engine is invoked to read and parse the business file based on the defined table, and the values ​​of the various original indicators are determined.

2. The method according to claim 1, further comprising: After determining the values ​​of each business indicator in the target indicator group, delete the definition table.

3. The method according to claim 1, wherein the definition table includes the Uniform Resource Locator (URL) of the business file; The step of calling the database engine to read the business file based on the defined table includes: The database engine is invoked to parse the Uniform Resource Locator (URL) of the business file in the definition table and read the business file.

4. The method according to claim 1, further comprising: Store the data standardization scripts corresponding to each of the multiple target indicator groups; The determination of the business document includes: Determine the original business file; wherein the original business file includes at least the values ​​of multiple original indicators that match the target indicator group; Based on the data standardization script matching the target indicator group, the content of the original business document is standardized to determine the business document.

5. The method according to claim 1, characterized in that, The determination of the business document includes: Store the business files corresponding to some indicator groups in multiple target indicator groups; Determine the business documents that match the target indicator group.

6. The method according to claim 1, characterized in that, The calculation rules include multiple raw indicators and multiple intermediate indicators between the corresponding target indicator groups; The process of calling the database engine to calculate the values ​​of each of the matched original indicators based on the calculation rules indicated by the configuration file matching the target indicator group, and determining the values ​​of each business indicator in the target indicator group, includes: The database engine is invoked to calculate the values ​​of the multiple original indicators matched based on the calculation rules indicated by the configuration file matching the target indicator group, thereby determining the fields of the multiple intermediate indicators; and the values ​​of each business indicator in the target indicator group are determined based on the fields of the multiple intermediate indicators.

7. The method according to claim 1, characterized in that, The configurable file can be opened, modified, and reconfigured using the spreadsheet software. The database engine is an SQL engine; The spreadsheet software mentioned is Excel.

8. The method according to claim 1, characterized in that, The method further includes: Save the values ​​of each business indicator in the target indicator group, and delete the content generated by the database engine in the process of calculating the values ​​of the multiple original indicators matched based on the calculation rules indicated by the configuration file matching the target indicator group.

9. An index calculation device, characterized in that, include: The file storage module is used to store the configuration files corresponding to each of the multiple target indicator groups generated by the spreadsheet software; wherein, the configuration file represents the calculation rules for determining the values ​​of each business indicator in the corresponding target indicator group based on the values ​​of the multiple original indicators. A request determination module is used to determine an indicator calculation request; wherein the indicator calculation request carries a target indicator group or an identifier of the target indicator group. The data determination module is used to determine the values ​​of each of the multiple original indicators matched by the target indicator group; The execution module is used to call the database engine to calculate the values ​​of the multiple original indicators matched based on the calculation rules indicated by the configuration file matching the target indicator group, and to determine the values ​​of each business indicator in the target indicator group. The execution module is used to generate an executable statement corresponding to the database engine based on the configuration file matched by the target indicator group; and to call the database engine to execute the executable statement to calculate the values ​​of each of the matched multiple original indicators. The data determination module is used to determine a business file; wherein the business file includes the values ​​of multiple original indicators matched by the target indicator group; the business file is mapped to a definition table in the database engine; the database engine is invoked to read and parse the business file based on the definition table to determine the values ​​of the multiple original indicators.

Citation Information

Patent Citations

  • Rule engine, calculating method, service system and calling method

    CN103942228A

  • Index data query method, device and equipment and storage medium

    CN112633761A

  • Business data processing method, device, equipment and system

    CN113535804A